home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_gnuplot.idb / usr / freeware / share / gnuplot.gih.z / gnuplot.gih
Encoding:
Text File  |  1998-05-21  |  250.0 KB  |  6,311 lines

  1. ?copyright
  2.        Copyright (C) 1986 - 1993, 1997   Thomas Williams, Colin Kelley
  3.  
  4.  Permission to use, copy, and distribute this software and its documentation
  5.  for any purpose with or without fee is hereby granted, provided that the
  6.  above copyright notice appears in all copies and that both that copyright
  7.  notice and this permission notice appear in supporting documentation.
  8.  
  9.  Permission to modify the software is granted, but not the right to distribute
  10.  the modified code.  Modifications are to be distributed as patches to the
  11.  released version.
  12.  
  13.  This software is provided "as is" without express or implied warranty.
  14.  
  15.  
  16.        AUTHORS
  17.  
  18.        Original Software:
  19.           Thomas Williams,  Colin Kelley.
  20.  
  21.        Gnuplot 2.0 additions:
  22.           Russell Lang, Dave Kotz, John Campbell.
  23.  
  24.        Gnuplot 3.0 additions:
  25.           Gershon Elber and many others.
  26. ?introduction
  27. ?
  28.  `gnuplot` is a command-driven interactive function and data plotting program.
  29.  It is case sensitive (commands and function names written in lowercase are
  30.  not the same as those written in CAPS).  All command names may be abbreviated
  31.  as long as the abbreviation is not ambiguous.  Any number of commands may
  32.  appear on a line (with the exception that `load` or `call` must be the final
  33.  command), separated by semicolons (;).  Strings are indicated with quotes.
  34.  They may be either single or double quotation marks, e.g.,
  35.  
  36.        load "filename"
  37.        cd 'dir'
  38.  
  39.  although there are some subtle differences (see `syntax` for more details).
  40.  
  41.  Any command-line arguments are assumed to be names of files containing
  42.  `gnuplot` commands, with the exception of standard X11 arguments, which are
  43.  processed first.  Each file is loaded with the `load` command, in the order
  44.  specified.  `gnuplot` exits after the last file is processed.  When no load
  45.  files are named, `gnuplot` enters into an interactive mode.
  46.  
  47.  Many `gnuplot` commands have multiple options.  These options must appear in
  48.  the proper order, although unwanted ones may be omitted in most cases.  Thus
  49.  if the entire command is "command a b c", then "command a c" will probably
  50.  work, but "command c a" will fail.
  51.  
  52.  Commands may extend over several input lines by ending each line but the last
  53.  with a backslash (\).  The backslash must be the _last_ character on each
  54.  line.  The effect is as if the backslash and newline were not there.  That
  55.  is, no white space is implied, nor is a comment terminated.  Therefore,
  56.  commenting out a continued line comments out the entire command (see
  57.  `comment`).  But note that if an error occurs somewhere on a multi-line
  58.  command, the parser may not be able to locate precisely where the error is
  59.  and in that case will not necessarily point to the correct line.
  60.  
  61.  In this document, curly braces ({}) denote optional arguments and a vertical
  62.  bar (|) separates mutually exclusive choices.  `gnuplot` keywords or `help`
  63.  topics are indicated by backquotes or `boldface` (where available).  Angle
  64.  brackets (<>) are used to mark replaceable tokens.
  65.  
  66.  For on-line help on any topic, type `help` followed by the name of the topic
  67.  or just `help` or `?` to get a menu of available topics.
  68.  
  69.  The new `gnuplot` user should begin by reading about the `plot` command (if
  70.  on-line, type `help plot`).
  71. ?seeking-assistance
  72.  There is a mailing list for `gnuplot` users.  Note, however, that the
  73.  newsgroup
  74.        comp.graphics.apps.gnuplot
  75.  is identical to the mailing list (they both carry the same set of messages).
  76.  We prefer that you read the messages through the newsgroup rather than
  77.  subscribing to the mailing list.  Administrative requests should be sent to
  78.        majordomo@dartmouth.edu
  79.  Send a message with the body (not the subject) consisting of the single word
  80.  "help" (without the quotes) for more details.
  81.  
  82.  The address for mailing to list members is:
  83.        info-gnuplot@dartmouth.edu
  84.  
  85.  Bug reports and code contributions should be mailed to:
  86.        bug-gnuplot@dartmouth.edu
  87.  
  88.  The list of those interested in beta-test versions is:
  89.        info-gnuplot-beta@dartmouth.edu
  90.  
  91.  There is also a World Wide Web page with up-to-date information, including
  92.  known bugs:
  93.        http://www.cs.dartmouth.edu/gnuplot
  94.  
  95.  Before seeking help, please check the
  96.  FAQ (Frequently Asked Questions) list.
  97.  If you do not have a copy of the FAQ, you may request a copy by email from
  98.  the Majordomo address above, or see the WWW `gnuplot` page.
  99.  
  100.  When posting a question, please include full details of the version of
  101.  `gnuplot`, the machine, and operating system you are using.  A _small_ script
  102.  demonstrating the problem may be useful.  Function plots are preferable to
  103.  datafile plots.  If email-ing to info-gnuplot, please state whether or not
  104.  you are subscribed to the list, so that users who use news will know to email
  105.  a reply to you.  There is a form for such postings on the WWW site.
  106. ?what's-new
  107.  Gnuplot version 3.6 contains many new features.  This section gives a partial
  108.  list and links to the new items in no particular order.
  109.  
  110.  1. `fit f(x) 'file' via` uses the Marquardt-Levenberg method to fit data.
  111.  (This is only slightly different from the `gnufit` patch available for 3.5.)
  112.  
  113.  2. Greatly expanded `using` command.  See `plot using`.
  114.  
  115.  3. `set timefmt` allows for the use of dates as input and output for time
  116.  series plots.  See `Time/Date data` and
  117.  timedat.dem.
  118.  
  119.  4. Multiline labels and font selection in some drivers.
  120.  
  121.  5. Minor (unlabeled) tics.  See `set mxtics`.
  122.  
  123.  6. `key` options for moving the key box in the page (and even outside of the
  124.  plot), putting a title on it and a box around it, and more.  See `set key`.
  125.  
  126.  7. Multiplots on a single logical page with `set multiplot`.
  127.  
  128.  8. Enhanced `postscript` driver with super/subscripts and font changes.
  129.  (This was a separate driver (`enhpost`) that was available as a patch for
  130.  3.5.)
  131.  
  132.  9. Second axes:  use the top and right axes independently of the bottom and
  133.  left, both for plotting and labels.  See `plot`.
  134.  
  135.  10. Special datafile names `'-'` and `""`.  See `plot special-filenames`.
  136.  
  137.  11. Additional coordinate systems for labels and arrows.  See `coordinates`.
  138.  
  139.  12. `set size` can try to plot with a specified aspect ratio.
  140.  
  141.  13. `set missing` now treats missing data correctly.
  142.  
  143.  14. The `call` command: `load` with arguments.
  144.  
  145.  15. More flexible `range` commands with `reverse` and `writeback` keywords.
  146.  
  147.  16. `set encoding` for multi-lingual encoding.
  148.  
  149.  17. New `x11` driver with persistent and multiple windows.
  150.  
  151.  18. New plotting styles: `xerrorbars`, `histeps`, `financebars` and more.
  152.  See `set style`.
  153.  
  154.  19. New tic label formats, including `"%l %L"` which uses the mantissa and
  155.  exponents to a given base for labels.  See `set format`.
  156.  
  157.  20. New drivers, including `cgm` for inclusion into MS-Office applications
  158.  and `gif` for serving plots to the WEB.
  159.  
  160.  21. Smoothing and spline-fitting options for `plot`.  See `plot smooth`.
  161.  
  162.  22. `set margin` and `set origin` give much better control over where a
  163.  graph appears on the page.
  164.  
  165.  23. `set border` now controls each border individually.
  166.  
  167.  24. The new commands `if` and `reread` allow command loops.
  168.  
  169.  25. Point styles and sizes, line types and widths can be specified on the
  170.  `plot` command.  Line types and widths can also be specified for grids,
  171.  borders, tics and arrows.  See `plot with`.  Furthermore these types may be
  172.  combined and stored for further use.  See `set linestyle`.
  173.  
  174.  26. Text (labels, tic labels, and the time stamp) can be written vertically
  175.  by those terminals capable of doing so.
  176. ?line-editing
  177. ?editing
  178. ?history
  179. ?command-line-editing
  180.  Command-line editing is supported by the Unix, Atari, VMS, MS-DOS and OS/2
  181.  versions of `gnuplot`.  Also, a history mechanism allows previous commands to
  182.  be edited and re-executed.  After the command line has been edited, a newline
  183.  or carriage return will enter the entire line without regard to where the
  184.  cursor is positioned.
  185.  
  186.  (The readline function in `gnuplot` is not the same as the readline used in
  187.  GNU Bash and GNU Emacs.  If the GNU version is desired, it may be selected
  188.  instead of the `gnuplot` version at compile time.)
  189.  
  190.  
  191.  The editing commands are as follows:
  192.  
  193.        `Line-editing`:
  194.  
  195.        ^B    moves back a single character.
  196.        ^F    moves forward a single character.
  197.        ^A    moves to the beginning of the line.
  198.        ^E    moves to the end of the line.
  199.        ^H    and DEL delete the previous character.
  200.        ^D    deletes the current character.
  201.        ^K    deletes from current position to the end of line.
  202.        ^L,^R redraws line in case it gets trashed.
  203.        ^U    deletes the entire line.
  204.        ^W    deletes the last word.
  205.  
  206.        `History`:
  207.  
  208.        ^P    moves back through history.
  209.        ^N    moves forward through history.
  210.  
  211.  On the IBM PC, the use of a TSR program such as DOSEDIT or CED may be desired
  212.  for line editing.  The default makefile assumes that this is the case;  by
  213.  default `gnuplot` will be compiled with no line-editing capability.  If you
  214.  want to use `gnuplot`'s line editing, set READLINE in the makefile and add
  215.  readline.obj to the link file.  The following arrow keys may be used on the
  216.  IBM PC and Atari versions if readline is used:
  217.  
  218.        Left  Arrow      - same as ^B.
  219.        Right Arrow      - same as ^F.
  220.        Ctrl Left  Arrow - same as ^A.
  221.        Ctrl Right Arrow - same as ^E.
  222.        Up    Arrow      - same as ^P.
  223.        Down  Arrow      - same as ^N.
  224.  
  225.  The Atari version of readline defines some additional key aliases:
  226.  
  227.        Undo            - same as ^L.
  228.        Home            - same as ^A.
  229.        Ctrl Home       - same as ^E.
  230.        Esc             - same as ^U.
  231.        Help            - `help` plus return.
  232.        Ctrl Help       - `help `.
  233. ?comments
  234.  Comments are supported as follows: a # may appear in most places in a line
  235.  and `gnuplot` will ignore the rest of the line.  It will not have this effect
  236.  inside quotes, inside numbers (including complex numbers), inside command
  237.  substitutions, etc.  In short, it works anywhere it makes sense to work.
  238. ?coordinates
  239.  The commands `set arrow`, `set key`, and `set label` allow you to draw
  240.  something at an arbitrary position on the graph.  This position is specified
  241.  by the syntax:
  242.  
  243.        {<system>} <x>, {<system>} <y> {,{<system>} <z>}
  244.  
  245.  Each <system> can either be `first`, `second`, `graph` or `screen`.
  246.  
  247.  `first` places the x, y, or z coordinate in the system defined by the left
  248.  and bottom axes; `second` places it in the system defined by the second axes
  249.  (top and right); `graph` specifies the area within the axes---0,0 is bottom
  250.  left and 1,1 is top right (for splot, 0,0,0 is bottom left of plotting area;
  251.  use negative z to get to the base---see `set ticslevel`); and `screen`
  252.  specifies the screen area (the entire area---not just the portion selected by
  253.  `set size`), with 0,0 at bottom left and 1,1 at top right.
  254.  
  255.  If the coordinate system for x is not specified, `first` is used.  If the
  256.  system for y is not specified, the one used for x is adopted.
  257.  
  258.  If one (or more) axis is timeseries, the appropriate coordinate should
  259.  be given as a quoted time string according to the `timefmt` format string.
  260.  See `set xdata` and `set timefmt`.  `gnuplot` will also accept an integer
  261.  expression, which will be interpreted as seconds from 1 January 2000.
  262. ?environment
  263.  A number of shell environment variables are understood by `gnuplot`.  None of
  264.  these are required, but may be useful.
  265.  
  266.  If GNUTERM is defined, it is used as the name of the terminal type to be
  267.  used.  This overrides any terminal type sensed by `gnuplot` on start-up, but
  268.  is itself overridden by the .gnuplot (or equivalent) start-up file (see
  269.  `start-up`) and, of course, by later explicit changes.
  270.  
  271.  On Unix, AmigaDOS, AtariTOS, MS-DOS and OS/2, GNUHELP may be defined to be
  272.  the pathname of the HELP file (gnuplot.gih).
  273.  
  274.  On VMS, the logical name gnuplot$HELP should be defined as the name of the
  275.  help library for `gnuplot`.  The `gnuplot` help can be put inside any system
  276.  help library, allowing access to help from both within and outside `gnuplot`
  277.  if desired.
  278.  
  279.  On Unix, HOME is used as the name of a directory to search for a .gnuplot
  280.  file if none is found in the current directory.  On AmigaDOS, AtariTOS,
  281.  MS-DOS and OS/2, gnuplot is used.  On VMS, SYS$LOGIN: is used. See `help
  282.  start-up`.
  283.  
  284.  On Unix, PAGER is used as an output filter for help messages.
  285.  
  286.  On Unix, AtariTOS and AmigaDOS, SHELL is used for the `shell` command.  On
  287.  MS-DOS and OS/2, COMSPEC is used for the `shell` command.
  288.  
  289.  On MS-DOS, if the BGI interface is used, BGI is used to point to the full
  290.  path of the BGI drivers directory.  Furthermore, SVGA is used to name the
  291.  Super VGA BGI driver in 800x600 resolution and its mode of operation is
  292.  Name.Mode.  E.g., if the Super VGA driver is
  293.        C:\TC\BGI\SVGADRV.BGI
  294.  and mode 3 is used for 800x600 resolution, then use the following:
  295.        set BGI=C:\TC\BGI
  296.        set SVGA=SVGADRV.3
  297.  
  298.  FIT_SCRIPT may be used to specify a `gnuplot` command to be executed when a
  299.  fit is interrupted---see `fit`.  FIT_LOG specifies the filename of the
  300.  logfile maintained by fit.
  301. ?expressions
  302.  In general, any mathematical expression accepted by C, FORTRAN, Pascal, or
  303.  BASIC is valid.  The precedence of these operators is determined by the
  304.  specifications of the C programming language.  White space (spaces and tabs)
  305.  is ignored inside expressions.
  306.  
  307.  Complex constants are expressed as {<real>,<imag>}, where <real> and <imag>
  308.  must be numerical constants.  For example, {3,2} represents 3 + 2i; {0,1}
  309.  represents 'i' itself.  The curly braces are explicitly required here.
  310.  
  311.  Note that gnuplot uses both "real" and "integer" arithmetic, like FORTRAN and
  312.  C.  Integers are entered as "1", "-10", etc; reals as "1.0", "-10.0", "1e1",
  313.  3.5e-1, etc.  The most important difference between the two forms is in
  314.  division: division of integers truncates: 5/2 = 2; division of reals does
  315.  not: 5.0/2.0 = 2.5.  In mixed expressions, integers are "promoted" to reals
  316.  before evaluation: 5/2e0 = 2.5.  The result of division of a negative integer
  317.  by a positive one may vary among compilers.  Try a test like "print -5/2" to
  318.  determine if your system chooses -2 or -3 as the answer.
  319.  
  320.  The real and imaginary parts of complex expressions are always real, whatever
  321.  the form in which they are entered: in {3,2} the "3" and "2" are reals, not
  322.  integers.
  323. ?expressions functions
  324. ?functions
  325.  The functions in `gnuplot` are the same as the corresponding functions in
  326.  the Unix math library, except that all functions accept integer, real, and
  327.  complex arguments, unless otherwise noted.
  328.  
  329.  For those functions that accept or return angles that may be given in either
  330.  degrees or radians (sin(x), cos(x), tan(x), asin(x), acos(x), atan(x),
  331.  atan2(x) and arg(z)), the unit may be selected by `set angles`, which
  332.  defaults to radians.
  333.  
  334. ?expressions functions abs
  335. ?functions abs
  336. ?abs
  337.  The `abs` function returns the absolute value of its argument.  The returned
  338.  value is of the same type as the argument.
  339.  
  340.  For complex arguments, abs(x) is defined as the length of x in the complex
  341.  plane [i.e.,  sqrt(real(x)**2 + imag(x)**2) ].
  342. ?expressions functions acos
  343. ?functions acos
  344. ?acos
  345.  The `acos` function returns the arc cosine (inverse cosine) of its argument.
  346.  `acos` returns its argument in radians or degrees, as selected by `set
  347.  angles`.
  348. ?expressions functions acosh
  349. ?functions acosh
  350. ?acosh
  351.  The `acosh` function returns the inverse hyperbolic cosine of its argument in
  352.  radians.
  353. ?expressions functions arg
  354. ?functions arg
  355. ?arg
  356.  The `arg` function returns the phase of a complex number in radians or
  357.  degrees, as selected by `set angles`.
  358. ?expressions functions asin
  359. ?functions asin
  360. ?asin
  361.  The `asin` function returns the arc sin (inverse sin) of its argument.
  362.  `asin` returns its argument in radians or degrees, as selected by `set
  363.  angles`.
  364. ?expressions functions asinh
  365. ?functions asinh
  366. ?asinh
  367.  The `asinh` function returns the inverse hyperbolic sin of its argument in
  368.  radians.
  369. ?expressions functions atan
  370. ?functions atan
  371. ?atan
  372.  The `atan` function returns the arc tangent (inverse tangent) of its
  373.  argument.  `atan` returns its argument in radians or degrees, as selected by
  374.  `set angles`.
  375. ?expressions functions atan2
  376. ?functions atan2
  377. ?atan2
  378.  The `atan2` function returns the arc tangent (inverse tangent) of the ratio
  379.  of the real parts of its arguments.  `atan2` returns its argument in radians
  380.  or degrees, as selected by `set angles`, in the correct quadrant.
  381. ?expressions functions atanh
  382. ?functions atanh
  383. ?atan
  384.  The `atanh` function returns the inverse hyperbolic tangent of its argument
  385.  in radians.
  386. ?expressions functions besj0
  387. ?functions besj0
  388. ?besj0
  389.  The `besj0` function returns the j0th Bessel function of its argument.
  390.  `besj0` expects its argument to be in radians.
  391. ?expressions functions besj1
  392. ?functions besj1
  393. ?besj1
  394.  The `besj1` function returns the j1st Bessel function of its argument.
  395.  `besj1` expects its argument to be in radians.
  396. ?expressions functions besy0
  397. ?functions besy0
  398. ?besy0
  399.  The `besy0` function returns the y0th Bessel function of its argument.
  400.  `besy0` expects its argument to be in radians.
  401. ?expressions functions besy1
  402. ?functions besy1
  403. ?besy1
  404.  The `besy1` function returns the y1st Bessel function of its argument.
  405.  `besy1` expects its argument to be in radians.
  406. ?expressions functions ceil
  407. ?functions ceil
  408. ?ceil
  409.  The `ceil` function returns the smallest integer that is not less than its
  410.  argument.  For complex numbers, `ceil` returns the smallest integer not less
  411.  than the real part of its argument.
  412. ?expressions functions cos
  413. ?functions cos
  414. ?cos
  415.  The `cos` function returns the cosine of its argument.  `cos` accepts its
  416.  argument in radians or degrees, as selected by `set angles`.
  417. ?expressions functions cosh
  418. ?functions cosh
  419. ?cosh
  420.  The `cosh` function returns the hyperbolic cosine of its argument.  `cosh`
  421.  expects its argument to be in radians.
  422. ?expressions functions erf
  423. ?functions erf
  424. ?erf
  425.  The `erf` function returns the error function of the real part of its
  426.  argument.  If the argument is a complex value, the imaginary component is
  427.  ignored.
  428. ?expressions functions erfc
  429. ?functions erfc
  430. ?erfc
  431.  The `erfc` function returns 1.0 - the error function of the real part of its
  432.  argument.  If the argument is a complex value, the imaginary component is
  433.  ignored.
  434. ?expressions functions exp
  435. ?functions exp
  436. ?exp
  437.  The `exp` function returns the exponential function of its argument (`e`
  438.  raised to the power of its argument).  On some implementations (notably
  439.  suns), exp(-x) returns undefined for very large x.  A user-defined function
  440.  like safe(x) = x<-100 ? 0 : exp(x) might prove useful in these cases.
  441. ?expressions functions floor
  442. ?functions floor
  443. ?floor
  444.  The `floor` function returns the largest integer not greater than its
  445.  argument.  For complex numbers, `floor` returns the largest integer not
  446.  greater than the real part of its argument.
  447. ?expressions functions gamma
  448. ?functions gamma
  449. ?gamma
  450.  The `gamma` function returns the gamma function of the real part of its
  451.  argument.  For integer n, gamma(n+1) = n!.  If the argument is a complex
  452.  value, the imaginary component is ignored.
  453. ?expressions functions ibeta
  454. ?functions ibeta
  455. ?ibeta
  456.  The `ibeta` function returns the incomplete beta function of the real parts
  457.  of its arguments. p, q > 0 and x in [0:1].  If the arguments are complex,
  458.  the imaginary components are ignored.
  459. ?expressions functions inverf
  460. ?functions inverf
  461. ?inverf
  462.  The `inverf` function returns the inverse error function of the real part
  463.  of its argument.
  464. ?expressions functions igamma
  465. ?functions igamma
  466. ?igamma
  467.  The `igamma` function returns the incomplete gamma function of the real
  468.  parts of its arguments.  a > 0 and x >= 0.  If the arguments are complex,
  469.  the imaginary components are ignored.
  470. ?expressions functions imag
  471. ?functions imag
  472. ?imag
  473.  The `imag` function returns the imaginary part of its argument as a real
  474.  number.
  475. ?expressions functions invnorm
  476. ?functions invnorm
  477. ?invnorm
  478.  The `invnorm` function returns the inverse normal distribution function of
  479.  the real part of its argument.
  480. ?expressions functions int
  481. ?functions int
  482. ?int
  483.  The `int` function returns the integer part of its argument, truncated
  484.  toward zero.
  485. ?expressions functions lgamma
  486. ?functions lgamma
  487. ?lgamma
  488.  The `lgamma` function returns the natural logarithm of the gamma function
  489.  of the real part of its argument.  If the argument is a complex value, the
  490.  imaginary component is ignored.
  491. ?expressions functions log
  492. ?functions log
  493. ?log
  494.  The `log` function returns the natural logarithm (base `e`) of its argument.
  495. ?expressions functions log10
  496. ?functions log10
  497. ?log10
  498.  The `log10` function returns the logarithm (base 10) of its argument.
  499. ?expressions functions norm
  500. ?functions norm
  501. ?norm
  502.  The `norm` function returns the normal distribution function (or Gaussian)
  503.  of the real part of its argument.
  504. ?expressions functions rand
  505. ?functions rand
  506. ?rand
  507.  The `rand` function returns a pseudo random number in the interval [0:1]
  508.  using the real part of its argument as a seed.  If seed < 0, the sequence
  509.  is (re)initialized.  If the argument is a complex value, the imaginary
  510.  component is ignored.
  511. ?expressions functions real
  512. ?functions real
  513. ?real
  514.  The `real` function returns the real part of its argument.
  515. ?expressions functions sgn
  516. ?functions sgn
  517. ?sgn
  518.  The `sgn` function returns 1 if its argument is positive, -1 if its argument
  519.  is negative, and 0 if its argument is 0.  If the argument is a complex value,
  520.  the imaginary component is ignored.
  521. ?expressions functions sin
  522. ?functions sin
  523. ?sin
  524.  The `sin` function returns the sine of its argument.  `sin` expects its
  525.  argument to be in radians or degrees, as selected by `set angles`.
  526. ?expressions functions sinh
  527. ?functions sinh
  528. ?sinh
  529.  The `sinh` function returns the hyperbolic sine of its argument.  `sinh`
  530.  expects its argument to be in radians.
  531. ?expressions functions sqrt
  532. ?functions sqrt
  533. ?sqrt
  534.  The `sqrt` function returns the square root of its argument.
  535. ?expressions functions tan
  536. ?functions tan
  537. ?tan
  538.  The `tan` function returns the tangent of its argument.  `tan` expects
  539.  its argument to be in radians or degrees, as selected by `set angles`.
  540. ?expressions functions tanh
  541. ?functions tanh
  542. ?tanh
  543.  The `tanh` function returns the hyperbolic tangent of its argument.  `tanh`
  544.  expects its argument to be in radians.
  545.  
  546.  A few additional functions are also available.
  547.  
  548. ?expressions functions column
  549. ?functions column
  550. ?column
  551.  `column(x)` may be used only in expressions as part of `using` manipulations
  552.  to fits or datafile plots.  See `plot datafile using`.
  553. ?expressions tm_hour
  554. ?functions tm_hour
  555.  The `tm_hour` function interprets its argument as a time, in seconds from
  556.  1 Jan 2000.  It returns the hour (an integer in the range 0--23) as a real.
  557. ?expressions tm_mday
  558. ?functions tm_mday
  559.  The `tm_mday` function interprets its argument as a time, in seconds from
  560.  1 Jan 2000.  It returns the day of the month (an integer in the range 1--31)
  561.  as a real.
  562. ?expressions tm_min
  563. ?functions tm_min
  564.  The `tm_min` function interprets its argument as a time, in seconds from
  565.  1 Jan 2000.  It returns the minute (an integer in the range 0--59) as a real.
  566. ?expressions tm_mon
  567. ?functions tm_mon
  568.  The `tm_mon` function interprets its argument as a time, in seconds from
  569.  1 Jan 2000.  It returns the month (an integer in the range 1--12) as a real.
  570. ?expressions tm_sec
  571. ?functions tm_sec
  572.  The `tm_sec` function interprets its argument as a time, in seconds from
  573.  1 Jan 2000.  It returns the second (an integer in the range 0--59) as a real.
  574. ?expressions tm_wday
  575. ?functions tm_wday
  576.  The `tm_wday` function interprets its argument as a time, in seconds from
  577.  1 Jan 2000.  It returns the day of the week (an integer in the range 1--7) as
  578.  a real.
  579. ?expressions tm_yday
  580. ?functions tm_yday
  581.  The `tm_yday` function interprets its argument as a time, in seconds from
  582.  1 Jan 2000.  It returns the day of the year (an integer in the range 1--366)
  583.  as a real.
  584. ?expressions tm_year
  585. ?functions tm_year
  586.  The `tm_year` function interprets its argument as a time, in seconds from
  587.  1 Jan 2000.  It returns the year (an integer) as a real.
  588. ?expressions functions valid
  589. ?functions valid
  590. ?valid
  591.  `valid(x)` may be used only in expressions as part of `using` manipulations
  592.  to fits or datafile plots.  See `plot datafile using`.
  593. ?expressions operators
  594. ?operators
  595.  The operators in `gnuplot` are the same as the corresponding operators in the
  596.  C programming language, except that all operators accept integer, real, and
  597.  complex arguments, unless otherwise noted.  The ** operator (exponentiation)
  598.  is supported, as in FORTRAN.
  599.  
  600.  Parentheses may be used to change order of evaluation.
  601. ?expressions operators unary
  602. ?operators unary
  603. ?unary
  604.  The following is a list of all the unary operators and their usages:
  605.  
  606.      Symbol      Example    Explanation
  607.        -           -a          unary minus
  608.        +           +a          unary plus (no-operation)
  609.        ~           ~a        * one's complement
  610.        !           !a        * logical negation
  611.        !           a!        * factorial
  612.        $           $3        * call arg/column during `using` manipulation
  613.  (*) Starred explanations indicate that the operator requires an integer
  614.  argument.
  615.  
  616.  Operator precedence is the same as in Fortran and C.  As in those languages,
  617.  parentheses may be used to change the order of operation.  Thus -2**2 = -4,
  618.  but (-2)**2 = 4.
  619.  
  620.  The factorial operator returns a real number to allow a greater range.
  621. ?expressions operators binary
  622. ?operators binary
  623. ?binary
  624.  The following is a list of all the binary operators and their usages:
  625.  
  626.      Symbol       Example      Explanation
  627.        **          a**b          exponentiation
  628.        *           a*b           multiplication
  629.        /           a/b           division
  630.        %           a%b         * modulo
  631.        +           a+b           addition
  632.        -           a-b           subtraction
  633.        ==          a==b          equality
  634.        !=          a!=b          inequality
  635.        <           a<b           less than
  636.        <=          a<=b          less than or equal to
  637.        >           a>b           greater than
  638.        >=          a>=b          greater than or equal to
  639.        &           a&b         * bitwise AND
  640.        ^           a^b         * bitwise exclusive OR
  641.        |           a|b         * bitwise inclusive OR
  642.        &&          a&&b        * logical AND
  643.        ||          a||b        * logical OR
  644.  
  645.  (*) Starred explanations indicate that the operator requires integer
  646.  arguments.
  647.  
  648.  Logical AND (&&) and OR (||) short-circuit the way they do in C.  That is,
  649.  the second `&&` operand is not evaluated if the first is false; the second
  650.  `||` operand is not evaluated if the first is true.
  651. ?expressions operators ternary
  652. ?operators ternary
  653. ?ternary
  654.  There is a single ternary operator:
  655.  
  656.      Symbol       Example      Explanation
  657.        ?:          a?b:c     ternary operation
  658.  
  659.  The ternary operator behaves as it does in C.  The first argument (a), which
  660.  must be an integer, is evaluated.  If it is true (non-zero), the second
  661.  argument (b) is evaluated and returned; otherwise the third argument (c) is
  662.  evaluated and returned.
  663.  
  664.  The ternary operator is very useful both in constructing piecewise functions
  665.  and in plotting points only when certain conditions are met.
  666.  
  667.  Examples:
  668.  
  669.  Plot a function that is to equal sin(x) for 0 <= x < 1, 1/x for 1 <= x < 2,
  670.  and undefined elsewhere:
  671.        f(x) = 0<=x && x<1 ? sin(x) : 1<=x && x<2 ? 1/x : 1/0
  672.        plot f(x)
  673.  Note that `gnuplot` quietly ignores undefined values, so the final branch of
  674.  the function (1/0) will produce no plottable points.  Note also that f(x)
  675.  will be plotted as a continuous function across the discontinuity if a line
  676.  style is used.  To plot it discontinuously, create separate functions for the
  677.  two pieces.  (Parametric functions are also useful for this purpose.)
  678.  
  679.  For data in a file, plot the average of the data in columns 2 and 3 against
  680.  the datum in column 1, but only if the datum in column 4 is non-negative:
  681.  
  682.        plot 'file' using 1:( $4<0 ? 1/0 : ($2+$3)/2 )
  683.  
  684.  Please see `plot data-file using` for an explanation of the `using` syntax.
  685. ?expressions user-defined
  686. ?user-defined
  687. ?variables
  688.  New user-defined variables and functions of one through five variables may
  689.  be declared and used anywhere, including on the `plot` command itself.
  690.  
  691.  User-defined function syntax:
  692.        <func-name>( <dummy1> {,<dummy2>} ... {,<dummy5>} ) = <expression>
  693.  
  694.  where <expression> is defined in terms of <dummy1> through <dummy5>.
  695.  
  696.  User-defined variable syntax:
  697.        <variable-name> = <constant-expression>
  698.  
  699.  Examples:
  700.        w = 2
  701.        q = floor(tan(pi/2 - 0.1))
  702.        f(x) = sin(w*x)
  703.        sinc(x) = sin(pi*x)/(pi*x)
  704.        delta(t) = (t == 0)
  705.        ramp(t) = (t > 0) ? t : 0
  706.        min(a,b) = (a < b) ? a : b
  707.        comb(n,k) = n!/(k!*(n-k)!)
  708.        len3d(x,y,z) = sqrt(x*x+y*y+z*z)
  709.        plot f(x) = sin(x*a), a = 0.2, f(x), a = 0.4, f(x)
  710.  
  711.  Note that the variable `pi` is already defined.  But it is in no way magic;
  712.  you may redefine it to be whatever you like.
  713.  
  714.  Valid names are the same as in most programming languages: they must begin
  715.  with a letter, but subsequent characters may be letters, digits, "$", or "_".
  716.  Note, however, that the `fit` mechanism uses several variables with names
  717.  that begin "FIT_".  It is safest to avoid using such names.  "FIT_LIMIT",
  718.  however, is one that you may wish to redefine.
  719.  
  720.  See `show functions` and `show variables`.
  721. ?glossary
  722.  Throughout this document an attempt has been made to maintain consistency of
  723.  nomenclature.  This cannot be wholly successful because as `gnuplot` has
  724.  evolved over time, certain command and keyword names have been adopted that
  725.  preclude such perfection.  This section contains explanations of the way
  726.  some of these terms are used.
  727.  
  728.  A "page" or "screen" is the entire area addressable by `gnuplot`.  On a
  729.  monitor, it is the full screen; on a plotter, it is a single sheet of
  730.  paper.
  731.  
  732.  A screen may contain one or more "plots".  A plot is defined by an
  733.  abscissa and an ordinate, although these need not actually appear on it, as
  734.  well as the margins and any text written therein.
  735.  
  736.  A plot contains one "graph".  A graph is defined by an abscissa and an
  737.  ordinate, although these need not actually appear on it.
  738.  
  739.  A graph may contain one or more "lines".  A line is a single function or
  740.  data set.  "Line" is also a plotting style.  The word will also be used in
  741.  sense "a line of text".  Presumably the context will always remove the
  742.  ambiguity.
  743.  
  744.  The lines on a graph may have individual names.  These may be listed together
  745.  with a sample of the plotting style used to represent them in the "key",
  746.  sometimes also called the "legend".
  747.  
  748.  The word "title" occurs with multiple meanings in `gnuplot`.  In this
  749.  document, it will always be preceded by the adjective "plot", "line", or
  750.  "key" to differentiate among them.
  751.  
  752.  A graph may have up to four labelled axes.  Various commands have the name of
  753.  an axis built into their names, such as `set xlabel`.  Other commands have
  754.  one or more axis names as options, such as `set logscale xy`.  The names of
  755.  the four axes for these usages are "x" for the axis along the bottom border
  756.  of the plot, "y" for the left border, "x2" for the top border, and "y2" for
  757.  the right border.  "z" also occurs in commands used with 3-d plotting.
  758.  
  759.  When discussing data files, the term "record" will be resurrected and used to
  760.  denote a single line in the file, that is, the characters between newline or
  761.  end-of-record characters.  A "point" is the datum on a single record, and a
  762.  "dataline" is a set of points on consecutive records, delimited by blank
  763.  records.
  764. ?plotting
  765.  There are three `gnuplot` commands which actually create a plot: `plot`,
  766.  `splot` and `replot`.  `plot` generates 2-d plots, `splot` generates 3-d
  767.  plots (actually 2-d projections, of course), and `replot` appends its
  768.  arguments to the previous `plot` or `splot` and executes the modified
  769.  command.
  770.  
  771.  Much of the general information about plotting can be found in the discussion
  772.  of `plot`; information specific to 3-d can be found in the `splot` section.
  773.  
  774.  `plot` operates in either rectangular or polar coordinates -- see `set polar`
  775.  for details of the latter.  `splot` operates only in rectangular coordinates,
  776.  but the `set mapping` command allows for a few other coordinate systems to be
  777.  treated.  In addition, the `using` option allows both `plot` and `splot` to
  778.  treat almost any coordinate system you'd care to define.
  779.  
  780.  `splot` can plot surfaces and contours in addition to lines.  See `splot
  781.  datafile` for information about the requisite file structure for both of
  782.  these; see `set isosamples` for information about defining the grid for a 3-d
  783.  function.  See `set contour` and `set cntrparam` for information about
  784.  contours.
  785. ?startup
  786. ?start
  787. ?.gnuplot
  788.  When `gnuplot` is run, it looks for an initialization file to load.  This
  789.  file is called `.gnuplot` on Unix and AmigaDOS systems, and `GNUPLOT.INI`
  790.  on other systems.  If this file is not found in the current directory, the
  791.  program will look for it in the home directory (under AmigaDOS,
  792.  Atari(single)TOS, MS-DOS and OS/2, the environment variable `gnuplot` should
  793.  contain the name of this directory).  Note: if NOCWDRC is defined during the
  794.  installation, `gnuplot` will not read from the current directory.
  795.  
  796.  If the initialization file is found, `gnuplot` executes the commands in it.
  797.  These may be any legal `gnuplot` commands, but typically they are limited to
  798.  setting the terminal and defining frequently-used functions or variables.
  799. ?substitution
  800.  Command-line substitution is specified by a system command enclosed in
  801.  backquotes.  This command is spawned and the output it produces replaces
  802.  the name of the command (and backquotes) on the command line.
  803.  
  804.  Newlines in the output produced by the spawned command are replaced with
  805.  blanks.
  806.  
  807.  Command-line substitution can be used anywhere on the `gnuplot` command
  808.  line.
  809.  
  810.  Example:
  811.  
  812.  This will run the program `leastsq` and replace `leastsq` (including
  813.  backquotes) on the command line with its output:
  814.        f(x) = `leastsq`
  815.  
  816.  or, in VMS
  817.        f(x) = `run leastsq`
  818. ?syntax
  819. ?specify
  820. ?punctuation
  821.  The general rules of syntax and punctuation in `gnuplot` are that keywords
  822.  and options are order-dependent.  Options and any accompanying parameters are
  823.  separated by spaces whereas lists and coordinates are separated by commas.
  824.  Ranges are separated by colons and enclosed in braces [], text and file names
  825.  are enclosed in quotes, and a few miscellaneous things are enclosed in
  826.  parentheses.  Brackets {} are used for a few special purposes.
  827.  
  828.  Commas are used to separate coordinates on the `set` commands `arrow`,
  829.  `key`, and `label`; the list of variables being fitted (the list after the
  830.  `via` keyword on the `fit` command); lists of discrete contours or the loop
  831.  parameters which specify them on the `set cntrparam` command; the arguments
  832.  of the `set` commands `dgrid3d`, `dummy`, `isosamples`, `offsets`, `origin`,
  833.  `samples`, `size`, `time`, and `view`; lists of tics or the loop parameters
  834.  which specify them; the offsets for titles and axis labels; parametric
  835.  functions to be used to calculate the x, y, and z coordinates on the `plot`,
  836.  `replot` and `splot` commands; and the complete sets of keywords specifying
  837.  individual plots (data sets or functions) on the `plot`, `replot` and `splot`
  838.  commands.
  839.  
  840.  Parentheses are used to delimit sets of explicit tics (as opposed to loop
  841.  parameters) and to indicate computations in the `using` filter of the `fit`,
  842.  `plot`, `replot` and `splot` commands.
  843.  
  844.  (Parentheses and commas are also used as usual in function notation.)
  845.  
  846.  Braces are used to delimit ranges, whether they are given on `set`, `plot` or
  847.  `splot` commands.
  848.  
  849.  Colons are used to separate extrema in `range` specifications (whether they
  850.  are given on `set`, `plot` or `splot` commands) and to separate entries in
  851.  the `using` filter of the `plot`, `replot`, `splot` and `fit` commands.
  852.  
  853.  Semicolons are used to separate commands given on a single command line.
  854.  
  855.  Brackets are used in text to be specially processed by some terminals, like
  856.  `postscript`.  They are also used to denote complex numbers: {3,2} = 3 + 2i.
  857.  
  858.  Text may be enclosed in single- or double-quotes.  Backslash processing of
  859.  sequences like \n (newline) and \345 (octal character code) is performed for
  860.  double-quoted strings, but not for single-quoted strings.
  861.  
  862.  The justification is the same for each line of a multi-line string.  Thus the
  863.  center-justified string
  864.        "This is the first line of text.\nThis is the second line."
  865.  will produce
  866.                         This is the first line of text.
  867.                            This is the second line.
  868.  but
  869.        'This is the first line of text.\nThis is the second line.'
  870.  will produce
  871.            This is the first line of text.\nThis is the second line.
  872.  
  873.  At present you should not embed \n inside {} when using the enhanced option
  874.  of the postscript terminal.
  875.  
  876.  The EEPIC, Imagen, Uniplex, LaTeX, and TPIC drivers allow a newline to be
  877.  specified by \\ in a single-quoted string or \\\\ in a double-quoted string.
  878.  
  879.  Back-quotes are used to enclose system commands for substitution.
  880. ?time/date
  881.  `gnuplot` supports the use of time and/or date information as input data.
  882.  This feature is activated by the commands `set xdata time`, `set ydata time`,
  883.  etc.
  884.  
  885.  Internally all times and dates are converted to the number of seconds from
  886.  the year 2000.  The command `set timefmt` defines the format for all inputs:
  887.  data files, ranges, tics, label positions---in short, anything that accepts a
  888.  data value must receive it in this format.  Since only one input format can
  889.  be in force at a given time, all time/date quantities being input at the same
  890.  time must be presented in the same format.  Thus if both x and y data in a
  891.  file are time/date, they must be in the same format.
  892.  
  893.  Commands like `show xrange` will re-interpret the integer according to
  894.  `timefmt`.  If you change `timefmt`, and then `show` the quantity again, it
  895.  will be displayed in the new `timefmt`.  For that matter, if you give the
  896.  deactivation command (like `set xdata`), the quantity will be shown in its
  897.  numerical form.
  898.  
  899.  The command `set format` defines the format that will be used for tic labels,
  900.  whether or not the specified axis is time/date.
  901.  
  902.  If time/date information is to be plotted from a file, the `using` option
  903.  _must_ be used on the `plot` or `splot` command.  These commands simply use
  904.  white space to separate columns, but white space may be embedded within the
  905.  time/date string.  If you use tabs as a separator, some trial-and-error may
  906.  be necessary to discover how your system treats them.
  907.  
  908.  The following example demonstrates time/date plotting.
  909.  
  910.  Suppose the file "data" contains records like
  911.  
  912.        03/21/95 10:00  6.02e23
  913.  
  914.  This file can be plotted by
  915.  
  916.        set xdata time
  917.        set timefmt "%m/%d"
  918.        set xrange ["03/21":"03/22"]
  919.        set format x "%m/%d"
  920.        set timefmt "%m/%d/%y %H:%M"
  921.        plot "data" using 1:3
  922.  
  923.  which will produce xtic labels that look like "03/21".
  924.  
  925.  See the descriptions of each command for more details.
  926. ?commands
  927. ?cd
  928.  The `cd` command changes the working directory.
  929.  
  930.  Syntax:
  931.        cd '<directory-name>'
  932.  
  933.  The directory name must be enclosed in quotes.
  934.  
  935.  Examples:
  936.        cd 'subdir'
  937.        cd ".."
  938.  
  939.  DOS users _must_ use single-quotes---backslash [\] has special significance
  940.  inside double-quotes.  For example,
  941.        cd "c:\newdata"
  942.  fails, but
  943.        cd 'c:\newdata'
  944.  works as expected.
  945. ?call
  946.  The `call` command is identical to the load command with one exception: you
  947.  can have up to ten additional parameters to the command (delimited according
  948.  to the standard parser rules) which can be substituted into the lines read
  949.  from the file.  As each line is read from the `call`ed input file, it is
  950.  scanned for the sequence `$` (dollar-sign) followed by a digit (0--9).  If
  951.  found, the sequence is replaced by the corresponding parameter from the
  952.  `call` command line.  If the parameter was specified as a string in the
  953.  `call` line, it is substituted without its enclosing quotes.  `$` followed by
  954.  any character other than a digit will be that character.  E.g. use `$$` to
  955.  get a single `$`.  Providing more than ten parameters on the `call` command
  956.  line will cause an error.  A parameter that was not provided substitutes as
  957.  nothing.  Files being `call`ed may themselves contain `call` or `load`
  958.  commands.
  959.  
  960.  The `call` command _must_ be the last command on a multi-command line.
  961.  
  962.  Syntax:
  963.        call "<input-file>" <parameter-0> <parm-1> ... <parm-9>
  964.  
  965.  The name of the input file must be enclosed in quotes, and it is recommended
  966.  that parameters are similarly enclosed in quotes (future versions of gnuplot
  967.  may treat quoted and unquoted arguments differently).
  968.  
  969.  Example:
  970.  
  971.  If the file 'calltest.gp' contains the line:
  972.        print "p0=$0 p1=$1 p2=$2 p3=$3 p4=$4 p5=$5 p6=$6 p7=x$7x"
  973.  
  974.  entering the command:
  975.        call 'calltest.gp' "abcd" 1.2 + "'quoted'" -- "$2"
  976.  
  977.  will display:
  978.        p0=abcd p1=1.2 p2=+ p3='quoted' p4=- p5=- p6=$2 p7=xx
  979.  
  980.  NOTE: there is a clash in syntax with the datafile `using` callback
  981.  operator.  Use `$$n` or `column(n)` to access column n from a datafile inside
  982.  a `call`ed datafile plot.
  983. ?clear
  984.  The `clear` command erases the current screen or output device as specified
  985.  by `set output`.  This usually generates a formfeed on hardcopy devices.  Use
  986.  `set terminal` to set the device type.
  987.  
  988.  For some terminals `clear` erases only the portion of the plotting surface
  989.  defined by `set size`, so for these it can be used in conjunction with `set
  990.  multiplot` to create an inset.
  991.  
  992.  Example:
  993.        set multiplot
  994.        plot sin(x)
  995.        set origin 0.5,0.5
  996.        set size 0.4,0.4
  997.        clear
  998.        plot cos(x)
  999.        set nomultiplot
  1000.  
  1001.  Please see `set multiplot`, `set size`, and `set origin` for details of these
  1002.  commands.
  1003. ?exit
  1004. ?quit
  1005.  The commands `exit` and `quit` and the END-OF-FILE character will exit
  1006.  `gnuplot`.  Each of these commands will clear the output device (as does
  1007.  the `clear` command) before exiting.
  1008. ?fit
  1009.  This implementation incorporates the capability of nonlinear least squares
  1010.  fitting using the Marquardt-Levenberg Algorithm.  It may fit any user-defined
  1011.  function to any set of data points (x,y) or (x,y,z).  x, y, z and the
  1012.  function's return type _must_ be real!  Any variable occurring in the
  1013.  function body may serve as a fit parameter (fitting functions without
  1014.  adjustable parameters make no sense).
  1015.  
  1016.  Syntax:
  1017.        fit {[xrange]} {[yrange]} <function>
  1018.            '<datafile>' {datafile-modifiers}
  1019.             via {'<parameter file>' | <var1>,<var2>,...}
  1020.  
  1021.  Notice that `via` is now a required keyword, to distinguish it from a 'scanf'
  1022.  format string.
  1023.  
  1024.  [xrange] and [yrange] are of the form [{variable=}{<min>}{:<max>}], allowing
  1025.  the range of the fit to be limited temporarily in a manner analogous to
  1026.  `plot`.  <function> is any valid `gnuplot` expression, although it is usual
  1027.  to use a previously user-defined function of the form f(x) or f(x,y).
  1028.  <datafile> is treated as in the `plot` command.  All the modifiers for
  1029.  datafiles (`using`, `every`,...) in `plot` are available here (except
  1030.  `smooth`)---see `plot datafile` for full details.  The default columns for x
  1031.  and y are 1 and 2.  These may be changed by the `using x:y` mechanism.  If
  1032.  `using` has a third entry (a column or an expression), it will be interpreted
  1033.  as the standard deviation of each y value and will be used to compute the
  1034.  weight; otherwise all data will be weighted equally.  If four columns are
  1035.  specified, they are x:y:z:error---note that an error _must_ be specified in
  1036.  order to perform a 3-d fit.  If errors are not available, a constant value
  1037.  can be specified, e.g., `using ...:(1)`.
  1038.  
  1039.  Initial values for the parameters to be fit may be specified in a (load-)file
  1040.  wherein each line is of the form:
  1041.  
  1042.        varname = value
  1043.  
  1044.  Comments, marked by '#', and blank lines are permissible.  The special form
  1045.  
  1046.        varname = value       # FIXED
  1047.  
  1048.  means that the variable is treated as a `fixed parameter` that is initialized
  1049.  but will not be adjusted.  It is not necessary (but sometimes useful for
  1050.  clarity) to specify them at all.  The keyword `# FIXED` has to appear in
  1051.  exactly this form.
  1052.  
  1053.  The other means of specifying the adjustable parameters is to provide a
  1054.  comma-separated list of variable names after the `via` keyword.  If any of
  1055.  these variables do not yet exist within the current `gnuplot` session, they
  1056.  are created with an initial value of 1.0, but the fit is more likely to
  1057.  converge if a more appropriate starting value is given.  If this form is
  1058.  used, it may prove beneficial to iterate the fit, allowing only one or two
  1059.  variables to be adjusted at a time until a reasonably close fit is obtained,
  1060.  before allowing `fit` to vary all parameters.
  1061.  
  1062.  After each iteration step, detailed information is given about the fit's
  1063.  state, both on the screen and on a logfile "fit.log".  This file will never be
  1064.  erased but always appended to so that the fit's history isn't lost.  After
  1065.  each iteration step, the fit may be interrupted by pressing Ctrl-C (any key
  1066.  _but_ Ctrl-C under MSDOS and Atari Multitasking Systems).  Then you have the
  1067.  options of stopping (and accepting the current parameter values), continuing
  1068.  the iteration of the fit, or executing a `gnuplot` command specified by an
  1069.  environment variable FIT_SCRIPT.  A `plot` or `load` command may be useful in
  1070.  this context.
  1071.  
  1072.  Special `gnuplot` variables:
  1073.  
  1074.        FIT_LIMIT
  1075.  may be specified to change the default epsilon limit (1e-5).  When the sum
  1076.  of squared residuals changes between two iteration steps by less than a
  1077.  factor of this number, the fit is considered to have 'converged'.
  1078.  
  1079.  Once the fit is converged, the final values may be stored in (load-)file
  1080.  suitable for use as an initial-value file, as discussed above.  Please see
  1081.  `update` for details.
  1082.  
  1083.        FIT_MAXITER
  1084.  may be specified to limit the number of iterations performed without
  1085.  convergence by FIT_LIMIT.  A value of 0 (or not defining it at all) means
  1086.  that there is no limit.
  1087.  
  1088.  [FIT_SKIP was available in previous releases of gnufit.  Its functionality
  1089.  is now obtained using the `every` modifier for datafiles.  FIT_INDEX was
  1090.  previously available in order to allow multi-branch fitting.  Multi-branch
  1091.  fitting in 2-d can now be done as a pseudo-3-d fit in which the y values are
  1092.  the dataline number (`using 1:-1:...`) or index (`using 1:-2:...`).]
  1093.  
  1094.  Environment variables:
  1095.  
  1096.        FIT_LOG
  1097.  changes the logfile's path from './fit.log' (write permission is necessary).
  1098.  
  1099.        FIT_SCRIPT
  1100.  specifies a command to be executed after an user interrupt.
  1101.  
  1102.  Examples:
  1103.        f(x) = a*x**2 + b*x + c
  1104.        FIT_LIMIT = 1e-6
  1105.        fit f(x) 'measured.dat' via 'start.par'
  1106.        fit f(x) 'measured.dat' using 3:($7-5) via 'start.par'
  1107.        fit f(x) './data/trash.dat' using 1:2:3 via a, b, c
  1108.        fit f(x,y) 'surface.dat' using 1:2:3:(1) via a, b, c
  1109. ?fit introduction
  1110.  Beginner's guide to fitting in general
  1111.  
  1112.  `fit` is used to find a set of parameters to be used in a parametric function
  1113.  to make it fit to your data optimally.  The quantity to be minimized is the
  1114.  sum of squared differences between your input data points and the function
  1115.  values at the same places, usually called 'chisquared' (i.e. the Greek letter
  1116.  chi, to the power of 2).  (To be precise, the differences will be divided by
  1117.  the input data errors before being squared; see `fit errors` for details.)
  1118.  
  1119.  Now that you know why it's called 'least squares fitting', let's see why it's
  1120.  'nonlinear'.  That's because the function's dependence on the parameters (not
  1121.  the data!) may be non-linear.  Of course, this might not tell you much if you
  1122.  didn't know already, so let me try to describe it.  If the fitting problem
  1123.  were to be linear, the target function would have to be a sum of simple,
  1124.  non-parametric functions, each multiplied by one parameter.  (For example,
  1125.  consider the function f(x) = c*sin(x), where we want to find the best value
  1126.  for the constant c.  This is nonlinear in x, of course, but it is linear in
  1127.  c.  Since the fitting procedure solves for c, it has a linear equation to
  1128.  solve.)  For such a linear case, the task of fitting can be performed by
  1129.  comparatively simple linear algebra in one direct step.  But `fit` can do
  1130.  more for you:  the parameters may be used in your function in any way you can
  1131.  imagine.  To handle this more general case, however, it has to perform an
  1132.  iteration, i.e. it will repeat a sequence of steps until it finds the fit to
  1133.  have 'converged', or until you stop it.
  1134.  
  1135.  Generally, the function to be fitted will come from some kind of theory (some
  1136.  prefer the term 'model' here) that makes a prediction about how the data
  1137.  should behave, and `fit` is then used to find the free parameters of the
  1138.  theory.  This is a typical task in scientific work, where you have lots of
  1139.  data that depend in more or less complicated ways on the values you're
  1140.  interested in.  The results will then usually be of the form 'the measured
  1141.  data can be described by the {foo} theory, for the following set of
  1142.  parameters', and then a set of values is given, together with the errors of
  1143.  your determination of these values.
  1144.  
  1145.  This reasoning implies that `fit` is probably _not_ your tool of choice if
  1146.  all you really want is a smooth line through your data points.  If you want
  1147.  this, the `smooth` option to `plot` is what you've been looking for, not
  1148.  `fit`.  See `plot datafile smooth` for details.
  1149. ?fit errors
  1150.  One of the most important things to keep in mind when using `fit` is the
  1151.  handling of errors.  Here, this term refers to the measurement errors
  1152.  accompanying both your input data and resulting parameters.
  1153.  
  1154.  The reason for the importance of input data errors to fitting is that
  1155.  normally the single measurements aren't all of the same quality, so they
  1156.  shouldn't have the same importance in determining the results.  That's one
  1157.  major reason for dividing the differences between data and function by the
  1158.  input errors, also known as 'weighting', in the computation of chisquared.
  1159.  
  1160.  By weighting, deviations from your function at places where the data have
  1161.  large errors will have a smaller part in chisquared, as the division will
  1162.  make them smaller compared to the better measurements.  Another reason for
  1163.  the division is that, for mathematical reasons, chisquared has to be a
  1164.  dimensionless variable, i.e. chisquared should be something like '15.3', not
  1165.  '15.3 square seconds'.
  1166.  
  1167.  Without input data errors being given, all data will be weighted equally, and
  1168.  the resulting errors of the parameters won't have much of a real meaning.
  1169.  Therefore, you should always try to find a sensible set of y-errors for your
  1170.  data.  An important example is that of data representing a histogram.  In
  1171.  such a case, the square root of the y value is often the correct input error
  1172.  to use.
  1173.  
  1174.  Once the fit iteration has stopped, it will display a load of valuable
  1175.  information which you will have to learn to interpret before you can use it.
  1176.  The 'sum of squares residuals' is the distance between the data and your fit
  1177.  function, shortly called 'chisquared'.  This is what `fit` tries to minimize.
  1178.  To quickly test if your fit went well, check that this is about the same as
  1179.  the number of data points minus the number of parameters (all this is only
  1180.  valid if you supplied y-errors, and the number of data points is large
  1181.  enough).  For details on this, look up the 'Chi-squared distribution' in your
  1182.  favourite statistics textbook.
  1183.  
  1184.  If chisquared is much larger than that, then your function didn't fit the
  1185.  data very well.  Try another, more general one, or allow more of the
  1186.  parameters to be adjusted by `fit`.  Another possible reason could be that
  1187.  the y-errors you supplied were a bit optimistic, i.e. too small.
  1188.  
  1189.  If, on the other hand, chisquared is too small, then the function fit the
  1190.  data _too_ well.  Either the given y-errors were too large, or the function
  1191.  is too general.  You should try to restrict it by either fixing some
  1192.  parameters, or just make it simpler one way or the other.
  1193.  
  1194.  If all else went well, you'll see a list of the resulting parameter values,
  1195.  together with estimates of the errors of these values.  And you should
  1196.  always be aware of this:  they're _estimates_, not more.  You'll have to get
  1197.  used to both `fit` and kind of problems you usually apply it to before you
  1198.  can use these errors for anything serious.  To start with, the errors
  1199.  reported by `fit` are insensitive to the global scale of the y-errors, i.e.
  1200.  if you multiply all y-errors by a constant, the resulting parameter errors
  1201.  don't change.
  1202.  
  1203.  And, to repeat this once more: if you didn't supply y-errors, the parameter
  1204.  errors will normally be meaningless.
  1205.  
  1206. ?fit tips
  1207.  Here are some tips to keep in mind to get the most out of `fit`.  They're not
  1208.  very organized, so you'll have to read them several times until their essence
  1209.  has sunk in.
  1210.  
  1211.  The two forms of the `via` argument to `fit` serve two largely distinct
  1212.  purposes.  The `via "file"` form is best used for batch operation (possibly
  1213.  unattended), where you just supply the startup values in a file and perhaps
  1214.  later use `update` to copy the results back into another file (or the same
  1215.  one).
  1216.  
  1217.  The `via var1, var2, ...` form is best used interactively.  Using the command
  1218.  history mechanism built into gnuplot, you can easily edit the list of
  1219.  parameters to be fitted or supply new startup values for the next try.  This
  1220.  is particularly useful for hard problems, where a direct fit to all the
  1221.  parameters at once won't work, at least not without really _good_ values to
  1222.  start with.  To find such a set of good starting parameters, you can iterate
  1223.  several times, fitting only some of the parameters each time, until the
  1224.  values are close enough to the goal that the final fit (to all the
  1225.  parameters at once) will work.
  1226.  
  1227.  A general word about starting values:  `fit` may, and often will, get really
  1228.  badly lost in searching for the optimal parameter set if you start it way off
  1229.  any possible solution.  The main reason for this is that nonlinear fitting is
  1230.  not guaranteed to converge to a global optimum.  It can get stuck in a local
  1231.  optimum, and there's no way for the routine to find out about that.  You'll
  1232.  have to use your own judgement in checking whether this has happened to you
  1233.  or not.
  1234.  
  1235.  To partly avoid that problem, you should put all starting values at least
  1236.  roughly into the vicinity of the solution.  At least the order of magnitude
  1237.  should be correct, if possible.  The better your starting values are, the
  1238.  less error-prone the fit.  A good way to find starting values is to draw data
  1239.  and fit-function into one plot, and iterate, changing the values and
  1240.  `replot`-ting until reasonable similarity is reached.  The same plot is also
  1241.  useful to check if the fit got stuck in a non-global minimum.
  1242.  
  1243.  Make sure that there is no mutual dependency among parameters of the function
  1244.  you are fitting.  E.g., don't try to fit a*exp(x+b), because a*exp(x+b) =
  1245.  a*exp(b)*exp(x).  Instead, fit either a*exp(x) or exp(x+b).
  1246.  
  1247.  A technical issue:  the parameters must not be too different in magnitude.
  1248.  The larger the quotient of the largest and the smallest absolute parameter
  1249.  values, the slower the fit will converge.  If the quotient is close to or
  1250.  above the inverse of the machine floating point precision, it may take next
  1251.  to forever to converge, or refuse to converge at all.  You'll have to adapt
  1252.  your function to avoid this, e.g. replace 'parameter' by '1e9*parameter' in
  1253.  the function definition, and divide the starting value by 1e9.
  1254.  
  1255.  If you can write your function as a linear combination of simple functions
  1256.  weighted by the parameters to be fitted, by all means do so.  That helps a
  1257.  lot, because the problem is then not nonlinear any more.  It should take only
  1258.  a really small number of iterations to converge on a linear case, maybe even
  1259.  only one.
  1260.  
  1261.  In prescriptions for analysing data from practical experimentation courses,
  1262.  you'll often find descriptions how to first fit your data to some functions,
  1263.  maybe in a multi-step process accounting for several aspects of the
  1264.  underlying theory one by one, and then extract the data you really wanted
  1265.  from the fitting parameters of that function.  With `fit`, this last step can
  1266.  often be eliminated by rewriting the model function to directly use the
  1267.  desired final parameters.  Transforming data can also be avoided quite often,
  1268.  although sometimes at the cost of a harder fit problem.  If you think this
  1269.  contradicts the previous paragraph about keeping the fit function as simple
  1270.  as possible, you're correct.
  1271.  
  1272.  Finally, a nice quote from the manual of another fitting package (fudgit)
  1273.  that kind of summarizes all these issues:  "Nonlinear fitting is an art!"
  1274. ?help
  1275.  The `help` command displays on-line help. To specify information on a
  1276.  particular topic use the syntax:
  1277.  
  1278.        help {<topic>}
  1279.  
  1280.  If <topic> is not specified, a short message is printed about `gnuplot`.
  1281.  After help for the requested topic is given, a menu of subtopics is given;
  1282.  help for a subtopic may be requested by typing its name, extending the help
  1283.  request.  After that subtopic has been printed, the request may be extended
  1284.  again or you may go back one level to the previous topic.  Eventually, the
  1285.  `gnuplot` command line will return.
  1286.  
  1287.  If a question mark (?) is given as the topic, the list of topics currently
  1288.  available is printed on the screen.
  1289. ?if
  1290.  The `if` command allows commands to be executed conditionally.
  1291.  
  1292.  Syntax:
  1293.        if (<condition>) <command-line>
  1294.  
  1295.  <condition> will be evaluated.  If it is true (non-zero), then the command(s)
  1296.  of the <command-line> will be executed.  If <condition> is false (zero), then
  1297.  the entire <command-line> is ignored.  Note that use of `;` to allow multiple
  1298.  commands on the same line will _not_ end the conditionalized commands.
  1299.  
  1300.  Examples:
  1301.        pi=3
  1302.        if (pi!=acos(-1)) print "?Fixing pi!"; pi=acos(-1); print pi
  1303.  will display:
  1304.        ?Fixing pi!
  1305.        3.14159265358979
  1306.  but
  1307.        if (1==2) print "Never see this"; print "Or this either"
  1308.  will not display anything.
  1309.  
  1310.  See `reread` for an example of how `if` and `reread` can be used together to
  1311.  perform a loop.
  1312. ?load
  1313.  The `load` command executes each line of the specified input file as if it
  1314.  had been typed in interactively.  Files created by the `save` command can
  1315.  later be `load`ed.  Any text file containing valid commands can be created
  1316.  and then executed by the `load` command.  Files being `load`ed may themselves
  1317.  contain `load` or `call` commands.  See `comment` for information about
  1318.  comments in commands.
  1319.  
  1320.  The `load` command _must_ be the last command on a multi-command line.
  1321.  
  1322.  Syntax:
  1323.        load "<input-file>"
  1324.  
  1325.  The name of the input file must be enclosed in quotes.
  1326.  
  1327.  Examples:
  1328.        load 'work.gnu'
  1329.        load "func.dat"
  1330.  
  1331.  The `load` command is performed implicitly on any file names given as
  1332.  arguments to `gnuplot`.  These are loaded in the order specified, and
  1333.  then `gnuplot` exits.  See also `call`.
  1334. ?pause
  1335.  The `pause` command displays any text associated with the command and then
  1336.  waits a specified amount of time or until the carriage return is pressed.
  1337.  `pause` is especially useful in conjunction with `load` files.
  1338.  
  1339.  Syntax:
  1340.        pause <time> {"<string>"}
  1341.  
  1342.  <time> may be any integer constant or expression.  Choosing -1 will wait
  1343.  until a carriage return is hit, zero (0) won't pause at all, and a positive
  1344.  integer will wait the specified number of seconds.  `pause 0` is synonymous
  1345.  with `print`.
  1346.  
  1347.  Note: Since `pause` communicates with the operating system rather than the
  1348.  graphics, it may behave differently with different device drivers (depending
  1349.  upon how text and graphics are mixed).
  1350.  
  1351.  Examples:
  1352.        pause -1    # Wait until a carriage return is hit
  1353.        pause 3     # Wait three seconds
  1354.        pause -1  "Hit return to continue"
  1355.        pause 10  "Isn't this pretty?  It's a cubic spline."
  1356.  
  1357. ?plot
  1358.  `plot` is the primary command for drawing plots with `gnuplot`.  It creates
  1359.  plots of functions and data in many, many ways.  `plot` is used to draw 2-d
  1360.  functions and data; `splot` draws 2-d projections of 3-d surfaces and data.
  1361.  `plot` and `splot` contain many common features; see `splot` for differences.
  1362.  
  1363.  Syntax:
  1364.        plot {<ranges>}
  1365.             {<function> | {"<datafile>" {datafile-modifiers}}}
  1366.             {axes <axes>} {<title-spec>} {with <style>}
  1367.             {, {definitions,} <function> ...}
  1368.  
  1369.  where either a <function> or the name of a data file enclosed in quotes is
  1370.  supplied.  A function is a mathematical expression or a pair of mathematical
  1371.  expressions in parametric mode.  The expressions may be defined completely or
  1372.  in part earlier in the stream of `gnuplot` commands (see `user-defined`).
  1373.  
  1374.  It is also possible to define functions and parameters on the `plot` command
  1375.  itself.  This is done merely by isolating them from other items with commas.
  1376.  
  1377.  There are four possible sets of axes available; the keyword <axes> is used to
  1378.  select the axes for which a particular line should be scaled.  `x1y1` refers
  1379.  to the axes on the bottom and left; `x2y2` to those on the top and right;
  1380.  `x1y2` to those on the bottom and right; and `x2y1` to those on the top and
  1381.  left.  Ranges specified on the `plot` command apply only to the first set of
  1382.  axes (bottom left).
  1383.  
  1384.  Examples:
  1385.        plot sin(x)
  1386.        plot f(x) = sin(x*a), a = .2, f(x), a = .4, f(x)
  1387.        plot [t=1:10] [-pi:pi*2] tan(t), \
  1388.             "data.1" using (tan($2)):($3/$4) smooth csplines \
  1389.                      axes x1y2 notitle with lines 5
  1390.  
  1391. ?plot data-file
  1392. ?plot datafile
  1393. ?data-file
  1394. ?datafile
  1395. ?data
  1396.  Discrete data contained in a file can be displayed by specifying the name of
  1397.  the data file (enclosed in quotes) on the `plot` or `splot` command line.
  1398.  
  1399.  Syntax:
  1400.        {s}plot '<file_name>' {index <index list>}
  1401.                              {every <every list>}
  1402.                              {thru <thru expression>}
  1403.                              {using <using list>}
  1404.                              {smooth <option>}
  1405.  
  1406.  The modifiers `index`, `every`, `thru`, `using`, and `smooth` are discussed
  1407.  separately.  In brief, `index` selects which data sets in a multi-data-set
  1408.  file are to be plotted, `every` specifies which points within a single data
  1409.  set are to be plotted, `using` determines how the columns within a single
  1410.  record are to be interpreted (`thru` is a special case of `using`), and
  1411.  `smooth` allows for simple interpolation and approximation.
  1412.  
  1413.  Data files should contain one data point per record.  Records beginning with
  1414.  # (or ! on VMS) will be treated as comments and ignored.  Each data point
  1415.  represents an (x,y) pair.  For `plot`s with error bars (see `set style
  1416.  errorbars`), each data point is (x,y,ydelta), (x,y,ylow,yhigh), (x,y,xdelta),
  1417.  (x,y,xlow,xhigh), or (x,y,xlow,xhigh,ylow,yhigh).  In all cases, the numbers
  1418.  on each record of a data file must be separated by white space (one or more
  1419.  blanks or tabs), unless a format specifier is provided by the `using` option.
  1420.  This white space divides each record into columns.
  1421.  
  1422.  Data may be written in exponential format with the exponent preceded by the
  1423.  letter e, E, d, D, q, or Q.
  1424.  
  1425.  Only one column (the y value) need be provided.  If x is omitted, `gnuplot`
  1426.  provides integer values starting at 0.
  1427.  
  1428.  In datafiles, blank records (records with no characters other than blanks and
  1429.  a newline and/or carriage return) are significant---pairs of blank records
  1430.  separate `index`es (see `plot datafile index`).  Data separated by double
  1431.  blank records are treated as if they were in separate data files.
  1432.  
  1433.  Single blank records designate discontinuities in a `plot`; no line will join
  1434.  points separated by a blank records (if they are plotted with a line style).
  1435.  
  1436.  If autoscaling has been enabled (`set autoscale`), the axes are automatically
  1437.  extended to include all datapoints, with a whole number of tic marks if tics
  1438.  are being drawn.  This has two consequences: i) For `splot`, the corner of
  1439.  the surface may not coincide with the corner of the base.  In this case, no
  1440.  vertical line is drawn.  ii) When plotting data with the same x range on a
  1441.  dual-axis graph, the x coordinates may not coincide if the x2tics are not
  1442.  being drawn.  This is because the x axis has been autoextended to a whole
  1443.  number of tics, but the x2 axis has not.  The following example illustrates
  1444.  the problem:
  1445.  
  1446.        reset; plot '-', '-'
  1447.        1 1
  1448.        19 19
  1449.        e
  1450.        1 1
  1451.        19 19
  1452.        e
  1453. ?plot data-file every
  1454. ?plot datafile every
  1455. ?plot every
  1456. ?data-file every
  1457. ?datafile every
  1458. ?every
  1459.  The `every` keyword allows a periodic sampling of a data set to be plotted.
  1460.  
  1461.  In the discussion a "point" is a datum defined by a single record in the
  1462.  file.
  1463.  
  1464.  Syntax:
  1465.        plot 'file' every {<point_incr>}
  1466.                            {:{<line_incr>}
  1467.                              {:{<start_point>}
  1468.                                {:{<start_line>}
  1469.                                  {:{<end_point>}
  1470.                                    {:<end_line>}}}}}
  1471.  
  1472.  The data points to be plotted are selected according to a loop from
  1473.  <`start_point`> to <`end_point`> with increment <`point_incr`> and the
  1474.  datalines according to a loop from <`start_line`> to <`end_line`> with
  1475.  increment <`line_incr`>.
  1476.  
  1477.  The first datum in each dataline is numbered '0', as is the first dataline in
  1478.  the file.
  1479.  
  1480.  Note that records containing unplottable information are counted.
  1481.  
  1482.  Any of the numbers can be omitted; the increments default to unity, the start
  1483.  values to the first point or dataline, and the end values to the last point
  1484.  or dataline.  If `every` is not specified, all points in all datalines are
  1485.  plotted.
  1486.  
  1487.  Examples:
  1488.        every :::3::3    # selects just the fourth dataline ('0' is first)
  1489.        every :::::9     # selects the first 10 datalines
  1490.        every 2:2        # selects every other point in every other dataline
  1491.        every ::5::15    # selects points 5 through 15 in each dataline
  1492. ?plot data-file example
  1493. ?plot datafile example
  1494. ?plot example
  1495. ?datafile example
  1496. ?data-file example
  1497. ?example
  1498.  This example compares the data in the file population.dat to a theoretical
  1499.  curve:
  1500.  
  1501.        pop(x) = 103*exp((1965-x)/10)
  1502.        plot [1960:1990] 'population.dat', pop(x)
  1503.  
  1504.  The file "population.dat" might contain:
  1505.  
  1506.        # Gnu population in Antarctica since 1965
  1507.           1965   103
  1508.           1970   55
  1509.           1975   34
  1510.           1980   24
  1511.           1985   10
  1512.  
  1513. ?plot data-file index
  1514. ?plot datafile index
  1515. ?plot index
  1516. ?data-file index
  1517. ?datafile index
  1518. ?index
  1519.  The `index` keyword allows only some of the data sets in a multi-data-set
  1520.  file to be plotted.
  1521.  
  1522.  Syntax:
  1523.        plot 'file' index <m>{{:<n>}:<p>}
  1524.  
  1525.  Data sets are separated by pairs of blank records.  `index <m>` selects only
  1526.  set <m>; `index <m>:<n>` selects sets in the range <m> to <n>; and `index
  1527.  <m>:<n>:<p>` selects indices <m>, <m>+<p>, <m>+2<p>, etc., but stopping at
  1528.  <n>.  Following C indexing, the index 0 is assigned to the first data set in
  1529.  the file.  Specifying too large an index results in an error message.  If
  1530.  `index` is not specified, all sets are plotted as a single data set.
  1531.  
  1532.  Example:
  1533.        plot 'file' index 4:5
  1534. ?plot data-file smooth
  1535. ?plot datafile smooth
  1536. ?plot smooth
  1537. ?data-file smooth
  1538. ?datafile smooth
  1539. ?smooth
  1540.  `gnuplot` includes a few general-purpose routines for interpolation and
  1541.  approximation of data; these are grouped under the `smooth` option.  More
  1542.  sophisticated data processing may be performed by preprocessing the data
  1543.  externally or by using `fit` with an appropriate model.
  1544.  
  1545.  Syntax:
  1546.        smooth {unique | csplines | acsplines | bezier | sbezier}
  1547.  
  1548.  `unique` plots the data after making them monotonic.  Each of the other
  1549.  routines uses the data to determine the coefficients of a continuous curve
  1550.  between the endpoints of the data.  This curve is then plotted in the same
  1551.  manner as a function, that is, by finding its value at uniform intervals
  1552.  along the abscissa (see `set samples`) and connecting these points with
  1553.  straight line segments (if a line style is chosen).
  1554.  
  1555.  If `autoscale` is in effect, the ranges will be computed such that the
  1556.  plotted curve lies within the borders of the graph.
  1557.  
  1558.  If too few points are available to allow the selected option to be applied,
  1559.  an error message is produced.  The minimum number is one for `unique`, four
  1560.  for `acsplines`, and three for the others.
  1561.  
  1562.  The `smooth` options have no effect on function plots.
  1563. ?plot data-file smooth acsplines
  1564. ?plot datafile smooth acsplines
  1565. ?data-file smooth acsplines
  1566. ?datafile smooth acsplines
  1567. ?plot smooth acsplines
  1568. ?plot acsplines
  1569. ?smooth acsplines
  1570. ?acsplines
  1571.  `acsplines` approximates the data with a "natural smoothing spline".  After
  1572.  the data are made monotonic in x (see `smooth unique`), a curve is piecewise
  1573.  constructed from segments of cubic polynomials whose coefficients are found
  1574.  by the weighting the data points; the weights are taken from the third column
  1575.  in the data file.  That default can be modified by the third entry in the
  1576.  `using` list, e.g.,
  1577.        plot 'data-file' using 1:2:(1.0) smooth acsplines
  1578.  
  1579.  Qualitatively, the absolute magnitude of the weights determines the number
  1580.  of segments used to construct the curve.  If the weights are large, the
  1581.  effect of each datum is large and the curve approaches that produced by
  1582.  connecting consecutive points with natural cubic splines.  If the weights are
  1583.  small, the curve is composed of fewer segments and thus is smoother; the
  1584.  limiting case is the single segment produced by a weighted linear least
  1585.  squares fit to all the data.  The smoothing weight can be expressed in terms
  1586.  of errors as a statistical weight for a point divided by a "smoothing factor"
  1587.  for the curve so that (standard) errors in the file can be used as smoothing
  1588.  weights.
  1589.  
  1590.  Example:
  1591.        sw(x,S)=1/(x*x*S)
  1592.        plot 'data_file' using 1:2:(sw($3,100)) smooth acsplines
  1593. ?plot data-file smooth bezier
  1594. ?plot datafile smooth bezier
  1595. ?plot smooth bezier
  1596. ?data-file smooth bezier
  1597. ?dat-file smooth bezier
  1598. ?plot bezier
  1599. ?smooth bezier
  1600. ?bezier
  1601.  The `bezier` option approximates the data with a Bezier curve of degree n
  1602.  (the number of data points) that connects the endpoints.
  1603. ?plot data-file smooth csplines
  1604. ?plot datafile smooth csplines
  1605. ?plot smooth csplines
  1606. ?data-file smooth csplines
  1607. ?datafile smooth csplines
  1608. ?plot csplines
  1609. ?smooth csplines
  1610. ?csplines
  1611.  The `csplines` option connects consecutive points by natural cubic splines
  1612.  after rendering the data monotonic (see `smooth unique`).
  1613. ?plot data-file smooth sbezier
  1614. ?plot datafile smooth sbezier
  1615. ?plot smooth sbezier
  1616. ?data-file smooth sbezier
  1617. ?datafile smooth sbezier
  1618. ?plot sbezier
  1619. ?smooth sbezier
  1620. ?sbezier
  1621.  The `sbezier` option first renders the data monotonic (`unique`) and then
  1622.  applies the `bezier` algorithm.
  1623. ?plot data-file smooth unique
  1624. ?plot datafile smooth unique
  1625. ?plot smooth unique
  1626. ?data-file smooth unique
  1627. ?datafile smooth unique
  1628. ?plot unique
  1629. ?smooth unique
  1630. ?unique
  1631.  The `unique` option makes the data monotonic in x; points with the same
  1632.  x-value are replaced by a single point having the average y-value.  The
  1633.  resulting points are then connected by straight line segments.
  1634. ?plot data-file special-filenames
  1635. ?plot datafile special-filenames
  1636. ?plot special-filenames
  1637. ?datafile special-filenames
  1638. ?special-filenames
  1639.  A special filename of `'-'` specifies that the data are inline; i.e., they
  1640.  follow the command.  Only the data follow the command; `plot` options like
  1641.  filters, titles, and line styles remain on the 'plot' command line.  This is
  1642.  similar to << in unix shell script, and $DECK in VMS DCL.  The data are
  1643.  entered as though they are being read from a file, one data point per record.
  1644.  The letter "e" at the start of the first column terminates data entry.  The
  1645.  `using` option can be applied to these data---using it to filter them through
  1646.  a function might make sense, but selecting columns probably doesn't!
  1647.  
  1648.  `'-'` is intended for situations where it is useful to have data and commands
  1649.  together, e.g., when `gnuplot` is run as a sub-process of some front-end
  1650.  application.  Some of the demos, for example, might use this feature.  While
  1651.  `plot` options such as `index` and `every` are recognized, their use forces
  1652.  you to enter data that won't be used.  For example, while
  1653.  
  1654.        plot '-' index 0, '-' index 1
  1655.        2
  1656.        4
  1657.        6
  1658.  
  1659.  
  1660.        10
  1661.        12
  1662.        14
  1663.        e
  1664.        2
  1665.        4
  1666.        6
  1667.  
  1668.  
  1669.        10
  1670.        12
  1671.        14
  1672.        e
  1673.  
  1674.  does indeed work,
  1675.  
  1676.        plot '-', '-'
  1677.        2
  1678.        4
  1679.        6
  1680.        e
  1681.        10
  1682.        12
  1683.        14
  1684.        e
  1685.  
  1686.  is a lot easier to type.
  1687.  
  1688.  If you use `'-'` with `replot`, you may need to enter the data more than once
  1689.  (see `replot`).
  1690.  
  1691.  A blank filename ('') specifies that the previous filename should be reused.
  1692.  This can be useful with things like
  1693.  
  1694.        plot 'a/very/long/filename' using 1:2, '' using 1:3, '' using 1:4
  1695.  
  1696.  (If you use both `'-'` and `''` on the same `plot` command, you'll need to
  1697.  have two sets of inline data, as in the example above.)
  1698.  
  1699.  On some computer systems with a popen function (Unix), the datafile can be
  1700.  piped through a shell command by starting the file name with a '<'.  For
  1701.  example,
  1702.  
  1703.        pop(x) = 103*exp(-x/10)
  1704.        plot "< awk '{print $1-1965, $2}' population.dat", pop(x)
  1705.  
  1706.  would plot the same information as the first population example but with
  1707.  years since 1965 as the x axis.  If you want to execute this example, you
  1708.  have to delete all comments from the data file above or substitute the
  1709.  following command for the first part of the command above (the part up to
  1710.  the comma):
  1711.  
  1712.        plot "< awk '$0 !~ /^#/ {print $1-1965, $2}' population.dat"
  1713.  
  1714.  While this approach is most flexible, it is possible to achieve simple
  1715.  filtering with the `using` or `thru` keywords.
  1716. ?plot data-file thru
  1717. ?plot datafile thru
  1718. ?plot thru
  1719. ?data-file thru
  1720. ?datafile thru
  1721. ?thru
  1722.  The `thru` function is provided for backward compatibility.
  1723.  
  1724.  Syntax:
  1725.        plot 'file' thru f(x)
  1726.  
  1727.  It is equivalent to:
  1728.  
  1729.        plot 'file' using 1:(f($2))
  1730.  
  1731.  While the latter appears more complex, it is much more flexible.  The more
  1732.  natural
  1733.  
  1734.        plot 'file' thru f(y)
  1735.  
  1736.  also works (i.e. you can use y as the dummy variable).
  1737.  
  1738.  `thru` is parsed for `splot` and `fit` but has no effect.
  1739. ?plot data-file using
  1740. ?plot datafile using
  1741. ?plot using
  1742. ?data-file using
  1743. ?datafile using
  1744. ?using
  1745.  The most common datafile modifier is `using`.
  1746.  
  1747.  Syntax:
  1748.        plot 'file' using {<entry> {:<entry> {:<entry> ...}}} {'format'}
  1749.  
  1750.  If a format is specified, each datafile record is read using the C library's
  1751.  'scanf' function, with the specified format string.  Otherwise the record is
  1752.  read and broken into columns at spaces or tabs.  A format cannot be specified
  1753.  if time-format data is being used (this must be done by `set data time`).
  1754.  
  1755.  The resulting array of data is then sorted into columns according to the
  1756.  entries.  Each <entry> may be a simple column number, which selects the
  1757.  datum, an expression enclosed in parentheses, or empty.  The expression can
  1758.  use $1 to access the first item read, $2 for the second item, and so on.  It
  1759.  can also use `column(x)` and `valid(x)` where x is an arbitrary expression
  1760.  resulting in an integer.  `column(x)` returns the x'th datum; `valid(x)`
  1761.  tests that the datum in the x'th column is a valid number.  A column number
  1762.  of 0 generates a number increasing (from zero) with each point, and is reset
  1763.  upon encountering two blank records.  A column number of -1 gives the
  1764.  dataline number, which starts at 0, increments at single blank records, and
  1765.  is reset at double blank records.  A column number of -2 gives the index
  1766.  number, which is incremented only when two blank records are found.  An empty
  1767.  <entry> will default to its order in the list of entries.  For example,
  1768.  `using ::4` is interpreted as `using 1:2:4`.
  1769.  
  1770.  N.B.---the `call` command also uses $'s as a special character.  See `call`
  1771.  for details about how to include a column number in a `call` argument list.
  1772.  
  1773.  If the `using` list has but a single entry, that <entry> will be used for y
  1774.  and the data point number is used for x; for example, "`plot 'file' using 1`"
  1775.  is identical to "`plot 'file' using 0:1`".  If the `using` list has two
  1776.  entries, these will be used for x and y.  Additional entries are usually
  1777.  errors in x and/or y.  See `set style` for details about plotting styles that
  1778.  make use of error information, and `fit` for use of error information in
  1779.  curve fitting.
  1780.  
  1781.  'scanf' accepts several numerical specifications but `gnuplot` requires all
  1782.  inputs to be double-precision floating-point variables, so `lf` is the only
  1783.  permissible specifier.  'scanf' expects to see white space---a blank, tab
  1784.  ("\t"), newline ("\n"), or formfeed ("\f")---between numbers; anything else
  1785.  in the input stream must be explicitly skipped.
  1786.  
  1787.  Note that the use of "\t", "\n", or "\f" or requires use of double-quotes
  1788.  rather than single-quotes.
  1789.  
  1790.  Examples:
  1791.  
  1792.  This creates a plot of the sum of the 2nd and 3rd data against the first:
  1793.  (The format string specifies comma- rather than space-separated columns.)
  1794.        plot 'file' using 1:($2+$3) '%lf,%lf,%lf'
  1795.  
  1796.  In this example the data are read from the file "MyData" using a more
  1797.  complicated format:
  1798.        plot "MyData" using "%*lf%lf%*20[^\n]%lf"
  1799.  
  1800.  The meaning of this format is:
  1801.  
  1802.        %*lf        ignore a number
  1803.        %lf         read a double-precision number (x by default)
  1804.        %*20[^\n]   ignore 20 non-newline characters
  1805.        %lf         read a double-precision number (y by default)
  1806.  
  1807.  One trick is to use the ternary `?:` operator to filter data:
  1808.  
  1809.        plot 'file' using 1:($3>10 ? $2 : 1/0)
  1810.  
  1811.  which plots the datum in column two against that in column one provided
  1812.  the datum in column three exceeds ten.  `1/0` is undefined; `gnuplot`
  1813.  quietly ignores undefined points, so unsuitable points are suppressed.
  1814.  
  1815.  In fact, you can use a constant expression for the column number, provided it
  1816.  doesn't start with an opening parenthesis; constructs like `using
  1817.  0+(complicated expression)` can be used.  The crucial point is that the
  1818.  expression is evaluated once if it doesn't start with a left parenthesis, or
  1819.  once for each data point read if it does.
  1820.  
  1821.  If timeseries data are being used, the time can span multiple columns.  The
  1822.  starting column should be specified.  Note that the spaces within the time
  1823.  must be included when calculating starting columns for other data.  E.g., if
  1824.  the first element on a line is a time with an embedded space, the y value
  1825.  should be specified as column three.
  1826.  
  1827.  It should be noted that `plot 'file'`, `plot 'file' using 1:2`, and `plot
  1828.  'file' using ($1):($2)` can be subtly different: 1) if `file` has some lines
  1829.  with one column and some with two, the first will invent x values when they
  1830.  are missing, the second will quietly ignore the lines with one column, and
  1831.  the third will store an undefined value for lines with one point (so that in
  1832.  a plot with lines, no line joins points across the bad point); 2) if a line
  1833.  contains text at the first column, the first will abort the plot on an error,
  1834.  but the second and third should quietly skip the garbage.
  1835.  
  1836.  In fact, it is often possible to plot a file with lots of lines of garbage at
  1837.  the top simply by specifying
  1838.  
  1839.        plot 'file' using 1:2
  1840.  
  1841.  If you want to leave text in your data files, it is always safe to put the
  1842.  comment character (#) in the first column of the text lines.
  1843. ?plot errorbars
  1844. ?splot errorbars
  1845. ?errorbars
  1846.  Error bars are supported for 2-d data file plots by reading one to four
  1847.  additional columns (or `using` entries); these additional values are used in
  1848.  different ways by the various errorbar styles.
  1849.  
  1850.  In the default situation, `gnuplot` expects to see three, four, or six
  1851.  numbers on each line of the data file---either
  1852.  
  1853.        (x, y, ydelta),
  1854.        (x, y, ylow, yhigh),
  1855.        (x, y, xdelta),
  1856.        (x, y, xlow, xhigh),
  1857.        (x, y, xdelta, ydelta), or
  1858.        (x, y, xlow, xhigh, ylow, yhigh).
  1859.  
  1860.  The x coordinate must be specified.  The order of the numbers must be
  1861.  exactly as given above, though the `using` qualifier can manipulate the order
  1862.  and provide values for missing columns.  For example,
  1863.  
  1864.        plot 'file' with errorbars
  1865.        plot 'file' using 1:2:(sqrt($1)) with xerrorbars
  1866.        plot 'file' using 1:2:($1-$3):($1+$3):4:5 with xyerrorbars
  1867.  
  1868.  The last example is for a file containing an unsupported combination of
  1869.  relative x and absolute y errors.  The `using` entry generates absolute x min
  1870.  and max from the relative error.
  1871.  
  1872.  The y error bar is a vertical line plotted from (x, ylow) to (x, yhigh).
  1873.  If ydelta is specified instead of ylow and yhigh, ylow = y - ydelta and
  1874.  yhigh = y + ydelta are derived.  If there are only two numbers on the record,
  1875.  yhigh and ylow are both set to y.  The x error bar is a horizontal line
  1876.  computed in the same fashion.  To get lines plotted between the data points,
  1877.  `plot` the data file twice, once with errorbars and once with lines (but
  1878.  remember to use the `notitle` option on one to avoid two entries in the key).
  1879.  
  1880.  The error bars have crossbars at each end unless `set bar` is used (see `set
  1881.  bar` for details).
  1882.  
  1883.  If autoscaling is on, the ranges will be adjusted to include the error bars.
  1884.  
  1885.  See `plot using`, `plot with`, and `set style` for more information.
  1886. ?plot parametric
  1887. ?splot parametric
  1888. ?parametric
  1889.  When in parametric mode (`set parametric`) mathematical expressions must be
  1890.  given in pairs for `plot` and in triplets for `splot`.
  1891.  
  1892.  Examples:
  1893.        plot sin(t),t**2
  1894.        splot cos(u)*cos(v),cos(u)*sin(v),sin(u)
  1895.  
  1896.  Data files are plotted as before, except any preceding parametric function
  1897.  must be fully specified before a data file is given as a plot.  In other
  1898.  words, the x parametric function (`sin(t)` above) and the y parametric
  1899.  function (`t**2` above) must not be interrupted with any modifiers or data
  1900.  functions; doing so will generate a syntax error stating that the parametric
  1901.  function is not fully specified.
  1902.  
  1903.  Other modifiers, such as `with` and `title`, may be specified only after the
  1904.  parametric function has been completed:
  1905.  
  1906.        plot sin(t),t**2 title 'Parametric example' with linespoints
  1907. ?splot ranges
  1908. ?plot ranges
  1909. ?ranges
  1910.  The optional ranges specify the region of the graph that will be displayed.
  1911.  
  1912.  Syntax:
  1913.        [{<dummy-var>=}{{<min>}:{<max>}}]
  1914.        [{{<min>}:{<max>}}]
  1915.  
  1916.  The first form applies to the independent variable (`xrange` or `trange`, if
  1917.  in parametric mode).  The second form applies to the dependent variable
  1918.  `yrange` (and `xrange`, too, if in parametric mode).  <dummy-var> is a new
  1919.  name for the independent variable.  (The defaults may be changed with `set
  1920.  dummy`.)  The optional <min> and <max> terms can be constant expressions or *.
  1921.  
  1922.  In non-parametric mode, the order in which ranges must be given is `xrange`
  1923.  and `yrange`.
  1924.  
  1925.  In parametric mode, the order for the `plot` command is `trange`, `xrange`,
  1926.  and `yrange`.  The following `plot` command shows setting the `trange` to
  1927.  [-pi:pi], the `xrange` to [-1.3:1.3] and the `yrange` to [-1:1] for the
  1928.  duration of the graph:
  1929.  
  1930.        plot [-pi:pi] [-1.3:1.3] [-1:1] sin(t),t**2
  1931.  
  1932.  Note that the x2range and y2range cannot be specified here---`set x2range`
  1933.  and `set y2range` must be used.
  1934.  
  1935.  Ranges are interpreted in the order listed above for the appropriate mode.
  1936.  Once all those needed are specified, no further ones must be listed, but
  1937.  unneeded ones cannot be skipped---use an empty range `[]` as a placeholder.
  1938.  
  1939.  `*` can be used to allow autoscaling of either of min and max.  See also
  1940.  `set autoscale`.
  1941.  
  1942.  Ranges specified on the `plot` or `splot` command line affect only that
  1943.  graph; use the `set xrange`, `set yrange`, etc., commands to change the
  1944.  default ranges for future graphs.
  1945.  
  1946.  With time data, you must provide the range (in the same manner as the time
  1947.  appears in the datafile) within quotes.  `gnuplot` uses the `timefmt` string
  1948.  to read the value---see `set timefmt`.
  1949.  
  1950.  Examples:
  1951.  
  1952.  This uses the current ranges:
  1953.        plot cos(x)
  1954.  
  1955.  This sets the x range only:
  1956.        plot [-10:30] sin(pi*x)/(pi*x)
  1957.  
  1958.  This is the same, but uses t as the dummy-variable:
  1959.        plot [t = -10 :30]  sin(pi*t)/(pi*t)
  1960.  
  1961.  This sets both the x and y ranges:
  1962.        plot [-pi:pi] [-3:3]  tan(x), 1/x
  1963.  
  1964.  This sets only the y range, and turns off autoscaling on both axes:
  1965.        plot [ ] [-2:sin(5)*-8] sin(x)**besj0(x)
  1966.  
  1967.  This sets xmax and ymin only:
  1968.        plot [:200] [-pi:]  exp(sin(x))
  1969.  
  1970.  This sets the x range for a timeseries:
  1971.        set timefmt "%d/%m/%y %H:%M"
  1972.        plot ["1/6/93 12:00":"5/6/93 12:00"] 'timedata.dat'
  1973.  
  1974. ?plot title
  1975. ?splot title
  1976.  A line title for each function and data set appears in the key, accompanied
  1977.  by a sample of the line and/or symbol used to represent it.  It can be
  1978.  changed by using the `title` option.
  1979.  
  1980.  Syntax:
  1981.        title "<title>" | notitle
  1982.  
  1983.  where <title> is the new title of the line and must be enclosed in quotes.
  1984.  The quotes will not be shown in the key.  A special character may be given as
  1985.  a backslash followed by its octal value ("\345").  The tab character "\t" is
  1986.  understood.  Note that backslash processing occurs only for strings enclosed
  1987.  in double quotes---use single quotes to prevent such processing.  The newline
  1988.  character "\n" is not processed in key entries in either type of string.
  1989.  
  1990.  The line title and sample can be omitted from the key by using the keyword
  1991.  `notitle`.  A null title (`title ''`) is equivalent to `notitle`.  If only
  1992.  the sample is wanted, use one or more blanks (`title ' '`).
  1993.  
  1994.  By default the line title is the function or file name as it appears on the
  1995.  `plot` command.  If it is a file name, any datafile modifiers specified will
  1996.  be included in the default title.
  1997.  
  1998.  The layout of the key itself (position, title justification, etc.) can be
  1999.  controlled by `set key`.  Please see `set key` for details.
  2000.  
  2001.  Examples:
  2002.  
  2003.  This plots y=x with the title 'x':
  2004.        plot x
  2005.  
  2006.  This plots x squared with title "x^2" and "data.1" with title 'measured
  2007.  data':
  2008.        plot x**2 title "x^2", "data.1" t 'measured data'
  2009.  
  2010.  This puts an untitled circular border around a polar graph:
  2011.        set polar; plot my_function(t), 1 notitle
  2012. ?plot with
  2013. ?plot style
  2014. ?splot with
  2015. ?splot style
  2016. ?style
  2017. ?with
  2018.  Functions and data may be displayed in one of a large number of styles.
  2019.  The `with` keyword provides the means of selection.
  2020.  
  2021.  Syntax:
  2022.        with <style> { {linestyle | ls <line_style>}
  2023.                       | {{linetype | lt <line_type>}
  2024.                          {linewidth | lw <line_width>}
  2025.                          {pointtype | pt <point_type>}
  2026.                          {pointsize | ps <point_size>}} }
  2027.  
  2028.  where <style> is either `lines`, `points`, `linespoints`, `impulses`, `dots`,
  2029.  `steps`, `fsteps`, `histeps`, `errorbars`, `xerrorbars`, `yerrorbars`,
  2030.  `xyerrorbars`, `boxes`, `boxerrorbars`, `boxxyerrorbars`, `financebars`,
  2031.  `candlesticks` or `vector`.  Some of these styles require additional
  2032.  information.  See `set style <style>` for details of each style.
  2033.  
  2034.  Default styles are chosen with the `set function style` and `set data style`
  2035.  commands.
  2036.  
  2037.  By default, each function and data file will use a different line type and
  2038.  point type, up to the maximum number of available types.  All terminal
  2039.  drivers support at least six different point types, and re-use them, in
  2040.  order, if more are required.  The LaTeX driver supplies an additional six
  2041.  point types (all variants of a circle), and thus will only repeat after 12
  2042.  curves are plotted with points.  The PostScript drivers (`postscript`)
  2043.  supplies a total of 64.
  2044.  
  2045.  If you wish to choose the line or point type for a single plot, <line_type>
  2046.  and <point_type> may be specified.  These are positive integer constants (or
  2047.  expressions) that specify the line type and point type to be used for the
  2048.  plot.  Use `test` to display the types available for your terminal.
  2049.  
  2050.  You may also scale the line width and point size for a plot by using
  2051.  <line_width> and <point_size>, which are specified relative to the default
  2052.  values for each terminal.  The pointsize may also be altered globally---see
  2053.  `set pointsize` for details.  But note that both <point_size> as set here and
  2054.  as set by `set pointsize` multiply the default point size---their effects are
  2055.  not cumulative.  That is, `set pointsize 2; plot x w p ps 3` will use points
  2056.  three times default size, not six.
  2057.  
  2058.  If you have defined specific line type/width and point type/size combinations
  2059.  with `set linestyle`, one of these may be selected by setting <line_style> to
  2060.  the index of the desired style.
  2061.  
  2062.  The keywords may be abbreviated as indicated.
  2063.  
  2064.  Note that the linewidth and pointsize options are not supported by all
  2065.  terminals.
  2066.  
  2067.  Examples:
  2068.  
  2069.  This plots sin(x) with impulses:
  2070.        plot sin(x) with impulses
  2071.  
  2072.  This plots x with points, x**2 with the default:
  2073.        plot x*y w points, x**2 + y**2
  2074.  
  2075.  This plots tan(x) with the default function style, "data.1" with lines:
  2076.        plot [ ] [-2:5] tan(x), "data.1" with l
  2077.  
  2078.  This plots "leastsq.dat" with impulses:
  2079.        plot 'leastsq.dat' w i
  2080.  
  2081.  This plots the data file 'population' with boxes:
  2082.        plot "population" with boxes
  2083.  
  2084.  This plots "exper.dat" with errorbars and lines connecting the points
  2085.  ('exper.dat' should have three or four data columns):
  2086.        plot 'exper.dat' w lines, 'exper.dat' notitle w errorbars
  2087.  
  2088.  This plots sin(x) and cos(x) with linespoints, using the same line type but
  2089.  different point types:
  2090.        plot sin(x) with linesp lt 1 pt 3, cos(x) with linesp lt 1 pt 4
  2091.  
  2092.  This plots file "data" with points of type 3 and twice usual size:
  2093.        plot "data" with points pointtype 3 pointsize 2
  2094.  
  2095.  This plots two data sets with lines differing only by weight:
  2096.        plot "d1" t "good" w l lt 2 lw 3, "d2" t "bad" w l lt 2 lw 1
  2097.  
  2098.  See `set style` to change the default styles.
  2099. ?print
  2100.  The `print` command prints the value of <expression> to the screen.  It is
  2101.  synonymous with `pause 0`.  <expression> may be anything that `gnuplot` can
  2102.  evaluate that produces a number, or it can be a string.
  2103.  
  2104.  Syntax:
  2105.        print <expression> {, <expression>, ...}
  2106.  
  2107.  See `expressions`.
  2108. ?pwd
  2109.  The `pwd` command prints the name of the working directory to the screen.
  2110. ?quit
  2111.  The `exit` and `quit` commands and END-OF-FILE character will exit `gnuplot`.
  2112.  Each of these commands will clear the output device (as does the `clear`
  2113.  command) before exiting.
  2114. ?replot
  2115.  The `replot` command without arguments repeats the last `plot` or `splot`
  2116.  command.  This can be useful for viewing a plot with different `set` options,
  2117.  or when generating the same plot for several devices.
  2118.  
  2119.  Arguments specified after a `replot` command will be added onto the last
  2120.  `plot` or `splot` command (with an implied ',' separator) before it is
  2121.  repeated.  `replot` accepts the same arguments as the `plot` and `splot`
  2122.  commands except that ranges cannot be specified.  Thus you can use `replot`
  2123.  to plot a function against the second axes if the previous command was `plot`
  2124.  but not if it was `splot`, and similarly you can use `replot` to add a plot
  2125.  from a binary file only if the previous command was `splot`.
  2126.  
  2127.  N.B.---use of
  2128.  
  2129.        plot '-' ; ... ; replot
  2130.  
  2131.  is not recommended.  `gnuplot` does not store the inline data internally, so
  2132.  since `replot` appends new information to the previous `plot` and then
  2133.  executes the modified command, the `'-'` from the initial `plot` will expect
  2134.  to read inline data again.
  2135.  
  2136.  Note that `replot` does not work in `multiplot` mode, since it reproduces
  2137.  only the last plot rather than the entire screen.
  2138.  
  2139.  See also `command-line-editing` for ways to edit the last `plot` (`splot`)
  2140.  command.
  2141. ?reread
  2142.  The `reread` command causes the current `gnuplot` command file, as specified
  2143.  by a `load` command or on the command line, to be reset to its starting
  2144.  point before further commands are read from it.  This essentially implements
  2145.  an endless loop of the commands from the beginning of the command file to
  2146.  the `reread` command.  (But this is not necessarily a disaster---`reread` can
  2147.  be very useful when used in conjunction with `if`.  See `if` for details.)
  2148.  The `reread` command has no effect if input from standard input.
  2149.  
  2150.  Examples:
  2151.  
  2152.  Suppose the file "looper" contains the commands
  2153.        a=a+1
  2154.        plot sin(x*a)
  2155.        pause -1
  2156.        if(a<5) reread
  2157.  and from within `gnuplot` you submit the commands
  2158.        a=0
  2159.        load 'looper'
  2160.  The result will be four plots (separated by the `pause` message).
  2161.  
  2162.  Suppose the file "data" contains six columns of numbers with a total yrange
  2163.  from 0 to 10; the first is x and the next are five different functions of x.
  2164.  Suppose also that the file "plotter" contains the commands
  2165.        c_p = c_p+1
  2166.        plot "$0" using 1:c_p with lines linetype c_p
  2167.        if(c_p <  n_p) reread
  2168.  and from within `gnuplot` you submit the commands
  2169.        n_p=6
  2170.        c_p=1
  2171.        set nokey
  2172.        set yrange [0:10]
  2173.        set multiplot
  2174.        call 'plotter' 'data'
  2175.        set nomultiplot
  2176.  The result is a single graph consisting of five plots.  The yrange must be
  2177.  set explicitly to guarantee that the five separate graphs (drawn on top of
  2178.  each other in multiplot mode) will have exactly the same axes.  The linetype
  2179.  must be specified; otherwise all the plots would be drawn with the same type.
  2180. ?reset
  2181.  The `reset` command causes all options that can be set with the `set`
  2182.  command to take on their default values.  The only exceptions are that the
  2183.  terminal set with `set term` and the output file set with `set output` are
  2184.  left unchanged.  This command is useful, e.g., to restore the default
  2185.  settings at the end of a command file, or to return to a defined state after
  2186.  lots of settings have been changed within a command file.  Please refer to
  2187.  the `set` command to see the default values that the various options take.
  2188. ?save
  2189.  The `save` command saves user-defined functions, variables, `set` options,
  2190.  or all three, plus the last `plot` (`splot`) command to the specified file.
  2191.  
  2192.  Syntax:
  2193.        save  {<option>} "<filename>"
  2194.  
  2195.  where <option> is `functions`, `variables` or `set`. If no option is used,
  2196.  `gnuplot` saves functions, variables, `set` options and the last `plot`
  2197.  (`splot`) command.
  2198.  
  2199.  `save`d files are written in text format and may be read by the `load`
  2200.  command.
  2201.  
  2202.  The filename must be enclosed in quotes.
  2203.  
  2204.  Examples:
  2205.        save "work.gnu"
  2206.        save functions 'func.dat'
  2207.        save var 'var.dat'
  2208.        save set "options.dat"
  2209. ?set
  2210. ?show
  2211. ?show all
  2212.  The `set` command sets _lots_ of options.  No screen is drawn, however, until
  2213.  a `plot`, `splot`, or `replot` command is given.
  2214.  
  2215.  The `show` command shows their settings.  `show all` shows all the
  2216.  settings.
  2217.  
  2218.  If a variable contains time/date data, `show` will display it according to
  2219.  the format currently defined by `set timefmt`, even if that was not in effect
  2220.  when the variable was initially defined.
  2221. ?set angles
  2222. ?show angles
  2223. ?angles
  2224. ?set angles degrees
  2225.  By default, `gnuplot` assumes the independent variable in polar graphs is in
  2226.  units of radians.  If `set angles degrees` is specified before `set polar`,
  2227.  then the default range is [0:360] and the independent variable has units of
  2228.  degrees.  This is particularly useful for plots of data files.  The angle
  2229.  setting also applies to 3-d mapping as set via the `set mapping` command.
  2230.  
  2231.  Syntax:
  2232.        set angles {degrees | radians}
  2233.        show angles
  2234.  
  2235.  The angle specified in `set grid polar` is also read and displayed in the
  2236.  units specified by `set angles`.
  2237.  
  2238.  `set angles` also affects the arguments of the machine-defined functions
  2239.  sin(x), cos(x) and tan(x), and the outputs of asin(x), acos(x), atan(x),
  2240.  atan2(x), and arg(x).  It has no effect on the arguments of hyperbolic
  2241.  functions or Bessel functions.  Note that the output of inverse hyperbolic
  2242.  functions of complex arguments are effected, however; if these functions are
  2243.  used, `set angles radians` must be in effect:
  2244.  
  2245.        x={1.0,0.1}
  2246.        set angles radians
  2247.        y=sinh(x)
  2248.        print y         #prints {1.16933, 0.154051}
  2249.        print asinh(y)  #prints {1.0, 0.1}
  2250.  but
  2251.        set angles degrees
  2252.        y=sinh(x)
  2253.        print y         #prints {1.16933, 0.154051}
  2254.        print asinh(y)  #prints {57.29578, 5.729578}
  2255. ?set arrow
  2256. ?set noarrow
  2257. ?show arrow
  2258. ?arrow
  2259. ?noarrow
  2260.  Arbitrary arrows can be placed on a plot using the `set arrow` command.
  2261.  
  2262.  Syntax:
  2263.        set arrow {<tag>} {from <position>} {to <position>} {{no}head}
  2264.                  { {linestyle | ls <line_style>}
  2265.                    | {linetype | lt <line_type>}
  2266.                      {linewidth | lw <line_width} }
  2267.        set noarrow {<tag>}
  2268.        show arrow
  2269.  
  2270.  <tag> is an integer that identifies the arrow.  If no tag is given, the
  2271.  lowest unused tag value is assigned automatically.  The tag can be used to
  2272.  delete or change a specific arrow.  To change any attribute of an existing
  2273.  arrow, use the `set arrow` command with the appropriate tag and specify the
  2274.  parts of the arrow to be changed.
  2275.  
  2276.  The <position>s are specified by either x,y or x,y,z, and may be preceded by
  2277.  `first`, `second`, `graph`, or `screen` to select the coordinate system.
  2278.  Unspecified coordinates default to 0.  The endpoints can be specified in
  2279.  one of four coordinate systems---`first` or `second` axes, `graph` or
  2280.  `screen`.  See `coordinates` for details.  A coordinate system specifier
  2281.  does not carry over from the "from" position to the "to" position.  Arrows
  2282.  outside the screen boundaries are permitted but may cause device errors.
  2283.  
  2284.  Specifying `nohead` produces an arrow drawn without a head---a line segment.
  2285.  This gives you yet another way to draw a line segment on the plot.  By
  2286.  default, arrows have heads.
  2287.  
  2288.  The line style may be selected from a user-defined list of line styles (see
  2289.  `set linestyle`) or may be defined here by providing values for <line_type>
  2290.  (an index from the default list of styles) and/or <line_width> (which is a
  2291.  multiplier for the default width).
  2292.  
  2293.  Note, however, that if a user-defined line style has been selected, its
  2294.  properties (type and width) cannot be altered merely by issuing another
  2295.  `set arrow` command with the appropriate index and `lt` or `lw`.
  2296.  
  2297.  Examples:
  2298.  
  2299.  To set an arrow pointing from the origin to (1,2) with user-defined style 5,
  2300.  use:
  2301.        set arrow to 1,2 ls 5
  2302.  
  2303.  To set an arrow from bottom left of plotting area to (-5,5,3), and tag the
  2304.  arrow number 3, use:
  2305.        set arrow 3 from graph 0,0 to -5,5,3
  2306.  
  2307.  To change the preceding arrow to end at 1,1,1, without an arrow head and
  2308.  double its width, use:
  2309.        set arrow 3 to 1,1,1 nohead lw 2
  2310.  
  2311.  To draw a vertical line from the bottom to the top of the graph at x=3, use:
  2312.        set arrow from 3, graph 0 to 3, graph 1 nohead
  2313.  
  2314.  To delete arrow number 2, use:
  2315.        set noarrow 2
  2316.  
  2317.  To delete all arrows, use:
  2318.        set noarrow
  2319.  
  2320.  To show all arrows (in tag order), use:
  2321.        show arrow
  2322. ?set autoscale
  2323. ?set noautoscale
  2324. ?show autoscale
  2325. ?autoscale
  2326. ?noautoscale
  2327.  Autoscaling may be set individually on the x, y or z axis or globally on all
  2328.  axes. The default is to autoscale all axes.
  2329.  
  2330.  Syntax:
  2331.        set autoscale {<axes>{min|max}}
  2332.        set noautoscale {<axes>{min|max}}
  2333.        show autoscale
  2334.  
  2335.  where <axes> is either `x`, `y`, `z`, `x2`, `y2` or `xy`.  A keyword with
  2336.  `min` or `max` appended (this cannot be done with `xy`) tells `gnuplot` to
  2337.  autoscale just the minimum or maximum of that axis.  If no keyword is given,
  2338.  all axes are autoscaled.
  2339.  
  2340.  When autoscaling, the axis range is automatically computed and the dependent
  2341.  axis (y for a `plot` and z for `splot`) is scaled to include the range of the
  2342.  function or data being plotted.
  2343.  
  2344.  If autoscaling of the dependent axis (y or z) is not set, the current y or z
  2345.  range is used.
  2346.  
  2347.  Autoscaling the independent variables (x for `plot` and x,y for `splot`) is a
  2348.  request to set the domain to match any data file being plotted.  If there are
  2349.  no data files, autoscaling an independent variable has no effect.  In other
  2350.  words, in the absence of a data file, functions alone do not affect the x
  2351.  range (or the y range if plotting z = f(x,y)).
  2352.  
  2353.  Please see `set xrange` for additional information about ranges.
  2354.  
  2355.  The behavior of autoscaling remains consistent in parametric mode, (see `set
  2356.  parametric`).  However, there are more dependent variables and hence more
  2357.  control over x, y, and z axis scales.  In parametric mode, the independent or
  2358.  dummy variable is t for `plot`s and u,v for `splot`s.  `autoscale` in
  2359.  parametric mode, then, controls all ranges (t, u, v, x, y, and z) and allows
  2360.  x, y, and z to be fully autoscaled.
  2361.  
  2362.  Autoscaling works the same way for polar mode as it does for parametric mode
  2363.  for `plot`, with the extension that in polar mode `set dummy` can be used to
  2364.  change the independent variable from t (see `set dummy`).
  2365.  
  2366.  When tics are displayed on second axes but no plot has been specified for
  2367.  those axes, x2range and y2range are inherited from xrange and yrange.  This
  2368.  is done _before_ xrange and yrange are autoextended to a whole number of
  2369.  tics, which can cause unexpected results.
  2370.  
  2371.  Examples:
  2372.  
  2373.  This sets autoscaling of the y axis (other axes are not affected):
  2374.        set autoscale y
  2375.  
  2376.  This sets autoscaling only for the minimum of the y axis (the maximum of the
  2377.  y axis and the other axes are not affected):
  2378.        set autoscale ymin
  2379.  
  2380.  This sets autoscaling of the x and y axes:
  2381.        set autoscale xy
  2382.  
  2383.  This sets autoscaling of the x, y, z, x2 and y2 axes:
  2384.        set autoscale
  2385.  
  2386.  This disables autoscaling of the x, y, z, x2 and y2 axes:
  2387.        set noautoscale
  2388.  
  2389.  This disables autoscaling of the z axis only:
  2390.        set noautoscale z
  2391. ?set autoscale parametric
  2392. ?set autoscale t
  2393.  When in parametric mode (`set parametric`), the xrange is as fully scalable
  2394.  as the y range.  In other words, in parametric mode the x axis can be
  2395.  automatically scaled to fit the range of the parametric function that is
  2396.  being plotted.  Of course, the y axis can also be automatically scaled just
  2397.  as in the non-parametric case.  If autoscaling on the x axis is not set, the
  2398.  current x range is used.
  2399.  
  2400.  Data files are plotted the same in parametric and non-parametric mode.
  2401.  However, there is a difference in mixed function and data plots: in
  2402.  non-parametric mode with autoscaled x, the x range of the datafile controls
  2403.  the x range of the functions; in parametric mode it has no influence.
  2404.  
  2405.  For completeness a last command `set autoscale t` is accepted.  However, the
  2406.  effect of this "scaling" is very minor.  When `gnuplot` determines that the
  2407.  t range would be empty, it makes a small adjustment if autoscaling is true.
  2408.  Otherwise, `gnuplot` gives an error.  Such behavior may, in fact, not be very
  2409.  useful and the command `set autoscale t` is certainly questionable.
  2410.  
  2411.  `splot` extends the above ideas as you would expect.  If autoscaling is set,
  2412.  then x, y, and z ranges are computed and each axis scaled to fit the
  2413.  resulting data.
  2414. ?set autoscale polar
  2415. ?set autoscale t
  2416.  When in polar mode (`set polar`), the xrange and the yrange are both found
  2417.  from the polar coordinates, and thus they can both be automatically scaled.
  2418.  In other words, in polar mode both the x and y axes can be automatically
  2419.  scaled to fit the ranges of the polar function that is being plotted.
  2420.  
  2421.  When plotting functions in polar mode, the rrange may be autoscaled.  When
  2422.  plotting data files in polar mode, the trange may also be autoscaled.  Note
  2423.  that if the trange is contained within one quadrant, autoscaling will produce
  2424.  a polar plot of only that single quadrant.
  2425.  
  2426.  Explicitly setting one or two ranges but not others may lead to unexpected
  2427.  results.
  2428. ?set bar
  2429. ?show bar
  2430.  The `set bar` command controls the tics at the ends of errorbars.
  2431.  
  2432.  Syntax:
  2433.        set bar {small | large | <size>}
  2434.        show bar
  2435.  
  2436.  `small` is a synonym for 0.0, and `large` for 1.0.
  2437.  The default is 1.0 if no size is given.
  2438. ?set bmargin
  2439. ?bmargin
  2440.  The command `set bmargin` sets the size of the bottom margin.  Please see
  2441.  `set margin` for details.
  2442. ?set border
  2443. ?set noborder
  2444. ?show border
  2445. ?border
  2446. ?noborder
  2447.  The `set border` and `set noborder` commands control the display of the graph
  2448.  borders for the `plot` and `splot` commands.
  2449.  
  2450.  Syntax:
  2451.        set border {<integer>}
  2452.        set noborder
  2453.        show border
  2454.  
  2455.  The borders are encoded in a 12-bit integer.  The bottom four bits control
  2456.  the border for `plot` and the sides of the base for `splot`, the next four
  2457.  bits control the verticals in `splot` and the top four bits control the edges
  2458.  on top of the `splot`.  In detail, the `<integer>` should be the sum of the
  2459.  appropriate entries from the following table:
  2460.  
  2461.                          plot border
  2462.                              and
  2463.                          splot base    splot verticals    splot top
  2464.        bottom (south)         1              16              256
  2465.        left   (west)          2              32              512
  2466.        top    (north)         4              64             1024
  2467.        right  (east)          8             128             2048
  2468.  
  2469.  The default is 31, which is all four sides for `plot`, and base and z axis
  2470.  for `splot`.
  2471.  
  2472.  To have tics on edges other than bottom and left, disable the usual tics and
  2473.  enable the second axes.
  2474.  
  2475.  Examples:
  2476.  
  2477.  Draw all borders:
  2478.        set border
  2479.  
  2480.  Draw only the SOUTHWEST borders:
  2481.        set border 3
  2482.  
  2483.  Draw a complete box around a `splot`:
  2484.        set border 4095
  2485.  
  2486.  Draw a partial box, omitting the front vertical:
  2487.        set border 127+256+512
  2488.  
  2489.  Draw only the NORTHEAST borders:
  2490.        set noxtics; set noytics; set x2tics; set y2tics; set border 12
  2491.  
  2492. ?set boxwidth
  2493. ?show boxwidth
  2494. ?boxwidth
  2495.  The `set boxwidth` command is used to set the default width of boxes in the
  2496.  `boxes` and `boxerrorbars` styles.
  2497.  
  2498.  Syntax:
  2499.        set boxwidth {<width>}
  2500.        show boxwidth
  2501.  
  2502.  If a data file is plotted without the width being specified in the third,
  2503.  fourth, or fifth column (or `using` entry), or if a function is plotted, the
  2504.  width of each box is set by the `set boxwidth` command.  (If a width is given
  2505.  both in the file and by the `set boxwidth` command, the one in the file is
  2506.  used.)  If the width is not specified in one of these ways, the width of each
  2507.  box will be calculated automatically so that it touches the adjacent boxes.
  2508.  In a four-column data set, the fourth column will be interpreted as the box
  2509.  width unless the width is set to -2.0, in which case the width will be
  2510.  calculated automatically.  See `set style boxerrorbars` for more details.
  2511.  
  2512.  To set the box width to automatic use the command
  2513.        set boxwidth
  2514.  or, for four-column data,
  2515.        set boxwidth -2
  2516.  
  2517.  The same effect can be achieved with the `using` keyword in `plot`:
  2518.        plot 'file' using 1:2:3:4:(-2)
  2519. ?set clabel
  2520. ?set noclabel
  2521. ?show clabel
  2522. ?clabel
  2523. ?noclabel
  2524.  `gnuplot` will vary the linetype used for each contour level when clabel is
  2525.  set.  When this option on (the default), a legend labels each linestyle with
  2526.  the z level it represents.  It is not possible at present to separate the
  2527.  contour labels from the surface key.
  2528.  
  2529.  Syntax:
  2530.        set clabel {'<format>'}
  2531.        set noclabel
  2532.        show clabel
  2533.  
  2534.  The default for the format string is %8.3g, which gives three decimal places.
  2535.  This may produce poor label alignment if the key is altered from its default
  2536.  configuration.
  2537.  
  2538.  See also `set contour`.
  2539. ?set clip
  2540. ?set noclip
  2541. ?show clip
  2542. ?clip
  2543. ?noclip
  2544.  `gnuplot` can clip data points and lines that are near the boundaries of a
  2545.  graph.
  2546.  
  2547.  Syntax:
  2548.        set clip <clip-type>
  2549.        set noclip <clip-type>
  2550.        show clip
  2551.  
  2552.  Three clip types are supported by `gnuplot`: `points`, `one`, and `two`.
  2553.  One, two, or all three clip types may be active for a single graph.
  2554.  
  2555.  The `points` clip type forces `gnuplot` to clip (actually, not plot at all)
  2556.  data points that fall within but too close to the boundaries.  This is done
  2557.  so that large symbols used for points will not extend outside the boundary
  2558.  lines.  Without clipping points near the boundaries, the plot may look bad.
  2559.  Adjusting the x and y ranges may give similar results.
  2560.  
  2561.  Setting the `one` clip type causes `gnuplot` to draw a line segment which has
  2562.  only one of its two endpoints within the graph.  Only the in-range portion of
  2563.  the line is drawn.  The alternative is to not draw any portion of the line
  2564.  segment.
  2565.  
  2566.  Some lines may have both endpoints out of range, but pass through the graph.
  2567.  Setting the `two` clip-type allows the visible portion of these lines to be
  2568.  drawn.
  2569.  
  2570.  In no case is a line drawn outside the graph.
  2571.  
  2572.  The defaults are `noclip points`, `clip one`, and `noclip two`.
  2573.  
  2574.  To check the state of all forms of clipping, use
  2575.        show clip
  2576.  
  2577.  For backward compatibility with older versions, the following forms are also
  2578.  permitted:
  2579.        set clip
  2580.        set noclip
  2581.  
  2582.  `set clip` is synonymous with `set clip points`; `set noclip` turns off all
  2583.  three types of clipping.
  2584. ?set cntrparam
  2585. ?show cntrparam
  2586. ?cntrparam
  2587.  `set cntrparam` controls the generation of contours and their smoothness for
  2588.  a contour plot.
  2589.  
  2590.  Syntax:
  2591.        set cntrparam {  {linear | cubicspline | bspline}
  2592.                       | points <n> | order <n>
  2593.                       | levels  {auto} {<n>}
  2594.                               | discrete <z1> {,<z2>} ...
  2595.                               | incremental {<start>, <incr> {,<end>}} }
  2596.        show cntrparam
  2597.  
  2598.  This command controls the way contours are plotted.  <n> should be an
  2599.  integral constant expression and <z1>, <z2> ... any constant expressions.
  2600.  The parameters are:
  2601.  
  2602.  `linear`, `cubicspline`, `bspline`---Controls type of approximation or
  2603.  interpolation.  If `linear`, then the contours are drawn piecewise linear, as
  2604.  extracted from the surface directly.  If `cubicspline`, then piecewise linear
  2605.  contours are interpolated to form somewhat smoother contours, but which may
  2606.  undulate.  If `bspline`, a guaranteed-smoother curve is drawn, which only
  2607.  approximates the piecewise linear data.
  2608.  
  2609.  `points`---Eventually all drawings are done with piecewise linear strokes.
  2610.  This number controls the number of points used to approximate a curve.
  2611.  It is relevant only for `cubicspline` and `bspline` modes.
  2612.  
  2613.  `order`---Order of the bspline approximation to be used.  The bigger this
  2614.  order is, the smoother the resulting contour.  (Of course, higher order
  2615.  bspline curves will move further away from the original piecewise linear
  2616.  data.)  This option is relevant for `bspline` mode only.  Allowed values are
  2617.  integers in the range from 2 (linear) to 10.
  2618.  
  2619.  `levels`---Approximate number of contour levels.  Selection of the levels is
  2620.  controlled by `auto` (default), `discrete`, and `incremental`.  For `auto`,
  2621.  if the surface is bounded by zmin and zmax, contours will be generated at
  2622.  integer multiples of dz between zmin and zmax, where dz is 1, 2, or 5 times
  2623.  some power of ten (like the step between two tic marks).  For `discrete`,
  2624.  contours will be generated at z = <z1>, <z2> ... as specified.  The number of
  2625.  discrete levels is limited to MAX_DISCRETE_LEVELS, defined in plot.h to be
  2626.  30.  If `incremental`, contours are generated at values of z beginning at
  2627.  <start> and increasing by <increment> until <end> is reached.  If <end> is
  2628.  not specified, MAX_DISCRETE_LEVELS will be generated.
  2629.  
  2630.  If the command `set cntrparam` is given without any arguments specified,  the
  2631.  defaults are used: linear, 5 points, order 4, 5 `auto` levels.
  2632.  
  2633.  Examples:
  2634.        set cntrparam bspline
  2635.        set cntrparam points 7
  2636.        set cntrparam order 10
  2637.  
  2638.  To select 5 levels automatically:
  2639.        set cntrparam levels auto 5
  2640.  
  2641.  To specify discrete levels at .1, .37, and .9:
  2642.        set cntrparam levels discrete .1,1/exp(1),.9
  2643.  
  2644.  To specify levels from 0 to 4 with increment 1:
  2645.        set cntrparam levels incremental  0,1,4
  2646.  
  2647.  To set the number of levels to 10 (retaining the current settings of auto,
  2648.  discr. and increment's start and increment value, while changing its end):
  2649.        set cntrparam levels 10
  2650.  
  2651.  To set the start and increment while retaining the number of levels:
  2652.        set cntrparam levels incremental 100,50
  2653.  
  2654.  See also `set contour` for control of where the contours are drawn, and `set
  2655.  clabel` for control of the format of the contour labels.
  2656. ?set contour
  2657. ?set nocontour
  2658. ?show contour
  2659. ?contour
  2660. ?nocontour
  2661.  `set contour` enables contour drawing for surfaces. This option is available
  2662.  for `splot` only.
  2663.  
  2664.  Syntax:
  2665.        set contour {base | surface | both}
  2666.        set nocontour
  2667.        show contour
  2668.  
  2669.  The three options specify where to draw the contours: `base` draws the
  2670.  contours on the grid base where the x/ytics are placed, `surface` draws the
  2671.  contours on the surfaces themselves, and `both` draws the contours on both
  2672.  the base and the surface.  If no option is provided, the default is `base`.
  2673.  
  2674.  See also `set cntrparam` for the parameters that affect the drawing of
  2675.  contours, and `set clabel` for control of labelling of the contours.
  2676.  
  2677.  The surface can be switched off (see `set surface`), giving a contour-only
  2678.  graph.  Though it is possible to use `set view` to enlarge the plot to fill
  2679.  the screen, better results can be obtained by writing the contour information
  2680.  out to a file, and rereading it as a 2-d datafile plot:
  2681.  
  2682.        set nosurface
  2683.        set contour
  2684.        set cntrparam ...
  2685.        set term table
  2686.        set out 'filename'
  2687.        splot ...
  2688.        set out
  2689.        # contour info now in filename
  2690.        set term <whatever>
  2691.        plot 'filename'
  2692.  
  2693.  In order to draw contours, the data must be organized as "grid data".  In
  2694.  such a file all of the points for a single y value are listed, then all the
  2695.  points for the next y, and so on.  A single blank line (a line containing no
  2696.  characters other than blank spaces and a carriage return and/or a line feed)
  2697.  separates one y value group from the next.  See also `plot datafile`.
  2698.  
  2699.  If contours are desired from non-grid data, `set dgrid3d` can be used to
  2700.  create an appropriate grid.  See `set dgrid3d` for more information.
  2701. ?set data style
  2702. ?show data style
  2703. ?data style
  2704.  The `set data style` command changes the default plotting style for data
  2705.  plots.
  2706.  
  2707.  Syntax:
  2708.        set data style <style-choice>
  2709.        show data style
  2710.  
  2711.  See `set style` for the choices.  If no choice is given, the choices are
  2712.  listed.  `show data style` shows the current default data plotting style.
  2713. ?set dgrid3d
  2714. ?set nodgrid3d
  2715. ?show dgrid3d
  2716. ?dgrid3d
  2717. ?nodgrid3d
  2718.  The `set dgrid3d` command enables and sets the different parameters for
  2719.  non-grid to grid data mapping.
  2720.  
  2721.  Syntax:
  2722.        set dgrid3d {<row_size>} {,{<col_size>} {,<norm>}}
  2723.        set nodgrid3d
  2724.        show dgrid3d
  2725.  
  2726.  By default `dgrid3d` is disabled.  When enabled, 3-d data read from a file
  2727.  are always treated as a scattered data set.  A grid with dimensions derived
  2728.  from a bounding box of the scattered data and size as specified by the
  2729.  row/col_size parameters is created for plotting and contouring.  The grid is
  2730.  equally spaced in x and y; the z values are computed as weighted averages of
  2731.  the scattered points' values.
  2732.  
  2733.  The third parameter, norm, controls the weighting: each point is weighted
  2734.  inversely by its distance (from the grid point) raised to the norm power.
  2735.  (Actually it's not quite the distance: the weights are given by the inverse
  2736.  of dx^norm + dy^norm, where dx and dy are the components of the separation
  2737.  of the grid point from each data point.)  Thus the closer the data point is
  2738.  to a grid point, the more effect it has on that grid point.  In `gnuplot`,
  2739.  this distance computation is optimized for norms that are powers of 2,
  2740.  specifically 1, 2, 4, 8, and 16, but any non-negative integer can be used.
  2741.  
  2742.  The `dgrid3d` option is a simple low pass filter that converts scattered data
  2743.  to a grid data set.  More sophisticated approaches to this problem exist and
  2744.  should be used to preprocess the data outside `gnuplot` if this simple
  2745.  solution is found inadequate.
  2746.  
  2747.  Examples:
  2748.        set dgrid3d 10,10,1     # defaults
  2749.        set dgrid3d ,,4
  2750.  
  2751.  The first specifies that a grid of size 10 by 10 is to be constructed using
  2752.  the L2 norm (a norm of 2 is to be used in the distance computation).  The
  2753.  second only modifies the norm to be used to L4.
  2754.  
  2755. ?set dummy
  2756. ?show dummy
  2757. ?dummy
  2758.  The `set dummy` command changes the default dummy variable names.
  2759.  
  2760.  Syntax:
  2761.        set dummy {<dummy-var>} {,<dummy-var>}
  2762.        show dummy
  2763.  
  2764.  By default, `gnuplot` assumes that the independent, or "dummy", variable for
  2765.  the `plot` command is "t" if in parametric or polar mode, or "x" otherwise.
  2766.  Similarly the independent variables for the `splot` command are "u" and "v"
  2767.  in parametric mode (`splot` cannot be used in polar mode), or "x" and "y"
  2768.  otherwise.
  2769.  
  2770.  It may be more convenient to call a dummy variable by a more physically
  2771.  meaningful or conventional name.  For example, when plotting time functions:
  2772.  
  2773.        set dummy t
  2774.        plot sin(t), cos(t)
  2775.  
  2776.  At least one dummy variable must be set on the command; `set dummy` by itself
  2777.  will generate an error message.
  2778.  
  2779.  Examples:
  2780.        set dummy u,v
  2781.        set dummy ,s
  2782.  
  2783.  The second example sets the second variable to s.
  2784. ?set encoding
  2785. ?show encoding
  2786. ?encoding
  2787.  The `set encoding` command selects a character encoding.  Valid values are
  2788.  `default`, which does nothing; `iso_8859_1` (known in the PostScript world as
  2789.  `ISO-Latin1`), which is used on many Unix workstations and with MS-Windows;
  2790.  `cp850`, for OS/2; and `cp437`, for MS-DOS.
  2791.  
  2792.  Syntax:
  2793.        set encoding <value>
  2794.        show encoding
  2795.  
  2796.  Please note that this is not supported on all terminal types.  Note also that
  2797.  the device must be able to produce the non-standard characters.
  2798. ?set format
  2799. ?show format
  2800. ?format
  2801.  The format of the tic-mark labels can be set with the `set format` command.
  2802.  
  2803.  Syntax:
  2804.        set format {<axes>} {"<format-string>"}
  2805.        set format {<axes>} {'<format-string>'}
  2806.        show format
  2807.  
  2808.  where <axes> is either `x`, `y`, `z`, `xy`, `x2`, `y2` or nothing (which is
  2809.  the same as `xy`).  The length of the string representing a ticmark (after
  2810.  formatting with 'printf') is restricted to 100 characters.  If the format
  2811.  string is omitted, the format will be returned to the default "%g".  For
  2812.  LaTeX users, the format "$%g$" is often desirable.  If the empty string "" is
  2813.  used, no label will be plotted with each tic, though the tic mark will still
  2814.  be plotted.  To eliminate all tic marks, use `set noxtics` or `set noytics`.
  2815.  
  2816.  Newline (\n) is accepted in the format string.  Use double-quotes rather than
  2817.  single-quotes to enable such interpretation.  See also `syntax`.
  2818.  
  2819.  The default format for both axes is "%g", but other formats such as "%.2f" or
  2820.  "%3.0em" are often desirable.  Anything accepted by 'printf' when given a
  2821.  double precision number, and accepted by the terminal, will work.  Some other
  2822.  options have been added.  If the format string looks like a floating point
  2823.  format, then `gnuplot` tries to construct a reasonable format.
  2824.  
  2825.  Characters not preceded by "%" are printed verbatim.  Thus you can include
  2826.  spaces and labels in your format string, such as "%g m", which will put " m"
  2827.  after each number.  If you want "%" itself, double it: "%g %%".
  2828.  
  2829.  The acceptable formats (if not in date/time mode) are:
  2830.  
  2831.        Format       Explanation
  2832.        %f           floating point notation
  2833.        %e or %E     exponential notation; an "e" or "E" before the power
  2834.        %g or %G     the shorter of %e (or %E) and %f
  2835.        %x or %X     hex
  2836.        %o or %O     octal
  2837.        %t           mantissa to base 10
  2838.        %l           mantissa to base of current logscale
  2839.        %s           mantissa to base of current logscale; scientific power
  2840.        %T           power to base 10
  2841.        %L           power to base of current logscale
  2842.        %S           scientific power
  2843.        %c           character replacement for scientific power
  2844.        %P           multiple of pi
  2845.  
  2846.  A 'scientific' power is one such that the exponent is a multiple of three.
  2847.  Character replacement of scientific powers (`"%c"`) has been implemented
  2848.  for powers in the range -18 to +18.  For numbers outside of this range the
  2849.  format reverts to exponential.
  2850.  
  2851.  Other acceptable modifiers (which come after the "%" but before the format
  2852.  specifier) are "-", which left-justifies the number; "+", which forces all
  2853.  numbers to be explicitly signed; "#", which places a decimal point after
  2854.  floats that have only zeroes following the decimal point; a positive integer,
  2855.  which defines the field width; "0" (the digit, not the letter) immediately
  2856.  preceding the field width, which indicates that leading zeroes are to be used
  2857.  instead of leading blanks; and a decimal point followed by a non-negative
  2858.  integer, which defines the precision (the minimum number of digits of an
  2859.  integer, or the number of digits following the decimal point of a float).
  2860.  
  2861.  Some releases of 'printf' may not support all of these modifiers but may also
  2862.  support others; in case of doubt, check the appropriate documentation and
  2863.  then experiment.
  2864.  
  2865.  Examples:
  2866.        set format y "%t"; set ytics (5,10)          # "5.0" and "1.0"
  2867.        set format y "%s"; set ytics (500,1000)      # "500" and "1.0"
  2868.        set format y "+-12.3f"; set ytics(12345)     # "+12345.000  "
  2869.        set format y "%.2t*10^%+03T"; set ytic(12345)# "1.23*10^+04"
  2870.        set format y "%s*10^{%S}"; set ytic(12345)   # "12.345*10^{3}"
  2871.        set format y "%s %cg"; set ytic(12345)       # "12.345 kg"
  2872.        set format y "%.0P pi"; set ytic(6.283185)   # "2 pi"
  2873.        set format y "%.0P%%"; set ytic(50)          # "50%"
  2874.  
  2875.        set log y 2; set format y '%l'; set ytics (1,2,3)
  2876.        #displays "1.0", "1.0" and "1.5" (since 3 is 1.5 * 2^1)
  2877.  
  2878.  There are some problem cases that arise when numbers like 9.999 are printed
  2879.  with a format that requires both rounding and a power.
  2880.  
  2881.  If the data type for the axis is date/time, the format string must contain
  2882.  valid codes for the 'strftime' function (outside of `gnuplot`, type "man
  2883.  strftime").  See `set timefmt` for a list of the allowed input format codes.
  2884.  
  2885.  In date/time mode, the acceptable formats are:
  2886.  
  2887.        Format       Explanation
  2888.        %a           abbreviated name of day of the week
  2889.        %A           full name of day of the week
  2890.        %b or %h     abbreviated name of the month
  2891.        %B           full name of the month
  2892.        %d           day of the month, 1--31
  2893.        %D           shorthand for "%m/%d/%y"
  2894.        %H or %k     hour, 0--24
  2895.        %I or %l     hour, 0--12
  2896.        %j           day of the year, 1--366
  2897.        %m           month, 1--12
  2898.        %M           minute, 0--60
  2899.        %p           "am" or "pm"
  2900.        %r           shorthand for "%I:%M:%S %p"
  2901.        %R           shorthand for %H:%M"
  2902.        %S           second, 0--60
  2903.        %T           shorthand for "%H:%M:%S"
  2904.        %U           week of the year (week starts on Sunday)
  2905.        %w           day of the week, 0--6 (Sunday = 0)
  2906.        %W           week of the year (week starts on Monday)
  2907.        %y           year, 0-99
  2908.        %Y           year, 4-digit
  2909.  
  2910.  Except for the non-numerical formats, these may be preceded by a "0" ("zero",
  2911.  not "oh") to pad the field length with leading zeroes, and a positive digit,
  2912.  to define the minimum field width (which will be overridden if the specified
  2913.  width is not large enough to contain the number).  There is a 24-character
  2914.  limit to the length of the printed text; longer strings will be truncated.
  2915.  
  2916.  Examples:
  2917.  
  2918.  Suppose the text is "76/12/25 23:11:11".  Then
  2919.        set format x                 # defaults to "12/25/76" \n "23:11"
  2920.        set format x "%A, %d %b %Y"  # "Saturday, 25 Dec 1976"
  2921.        set format x "%r %d"         # "11:11:11 pm 12/25/76"
  2922.  
  2923.  Suppose the text is "98/07/06 05:04:03".  Then
  2924.        set format x "%1y/%2m/%3d %01H:%02M:%03S"  # "98/ 7/  6 5:04:003"
  2925.  
  2926.  See also `set xtics` for more information about tic labels.
  2927. ?set function style
  2928. ?show function style
  2929. ?function style
  2930.  The `set function style` command changes the default plotting style for
  2931.  function plots.
  2932.  
  2933.  Syntax:
  2934.        set function style <style-choice>
  2935.        show function style
  2936.  
  2937.  See `set style` for the choices.  If no choice is given, the choices are
  2938.  listed.  `show function style` shows the current default function plotting
  2939.  style.
  2940. ?show functions
  2941.  The `show functions` command lists all user-defined functions and their
  2942.  definitions.
  2943.  
  2944.  Syntax:
  2945.        show functions
  2946.  
  2947.  For information about the definition and usage of functions in `gnuplot`,
  2948.  please see `expressions` and `user-defined`.
  2949. ?set grid
  2950. ?set nogrid
  2951. ?show grid
  2952. ?grid
  2953. ?nogrid
  2954.  The `set grid` command allows grid lines to be drawn on the plot.
  2955.  
  2956.  Syntax:
  2957.        set grid {{no}{m}xtics} {{no}{m}ytics} {{no}{m}ztics}
  2958.                 {{no}{m}x2tics} {{no}{m}y2tics}
  2959.                 {polar {<angle>}} {<major_linetype> {<minor_linetype>}}
  2960.        set nogrid
  2961.        show grid
  2962.  
  2963.  The grid can be enabled and disabled for the major and/or minor tic marks on
  2964.  any axis, and the linetype can be specified for major and minor grid lines.
  2965.  But note that <major_linetype> and <minor_linetype> are indices in the
  2966.  default linetype list provided by the terminal; user-defined linetypes (via
  2967.  the `set linestyle` command) are not accessible for grid lines.
  2968.  
  2969.  Additionally, a polar grid can be selected for 2-d plots---circles are drawn
  2970.  to intersect the selected tics, and radial lines are drawn at definable
  2971.  intervals.  (The interval is given in degrees or radians ,depending on the
  2972.  `set angles` setting.)  Note that a polar grid is no longer automatically
  2973.  generated in polar mode.
  2974.  
  2975.  The pertinent tics must be enabled before `set grid` can draw them; `gnuplot`
  2976.  will quietly ignore instructions to draw grid lines at non-existent tics, but
  2977.  they will appear if the tics are subsequently enabled.
  2978.  
  2979.  If no linetype is specified for the minor gridlines, the same linetype as the
  2980.  major gridlines is used.  The default polar angle is 30 degrees.
  2981.  
  2982.  Z grid lines are drawn on the back of the plot.  This looks better if a
  2983.  partial box is drawn around the plot---see `set border`.
  2984. ?set hidden3d
  2985. ?set nohidden3d
  2986. ?show hidden3d
  2987. ?hidden3d
  2988. ?nohidden3d
  2989.  The `set hidden3d` command enables hidden line removal for explicit surface
  2990.  plotting (see `splot`).
  2991.  
  2992.  Syntax:
  2993.        set hidden3d
  2994.        set nohidden3d
  2995.        show hidden3d
  2996.  
  2997.  Hidden line removal may be used for both explicit functions and for explicit
  2998.  data.  It now works for parametric surfaces as well.  This mode is meaningful
  2999.  only when surfaces are `splot`ted `with lines`.
  3000.  
  3001.  When this flag is set, both the hidden portion of the surface and possibly
  3002.  its hidden contours (see `set contour`) as well as the hidden grid will be
  3003.  removed.  Each surface has its hidden parts removed with respect to itself
  3004.  and to other surfaces, if more than one surface is plotted.  But contours
  3005.  drawn on the surface (`set contour surface`) don't seem to work.  Labels and
  3006.  arrows are always visible and are unaffected.
  3007. ?set isosamples
  3008. ?show isosamples
  3009. ?isosamples
  3010.  The isoline density of surfaces may be changed by the `set isosamples`
  3011.  command.
  3012.  
  3013.  Syntax:
  3014.        set isosamples <iso_1> {,<iso_2>}
  3015.        show isosamples
  3016.  
  3017.  Each surface plot will have <iso_1> iso-u lines and <iso_2> iso-v lines.  If
  3018.  you only specify <iso_1>, <iso_2> will be set to the same value as <iso_1>.
  3019.  By default, sampling is set to 10 isolines per u or v axis.  A higher
  3020.  sampling rate will produce more accurate plots, but will take longer.  These
  3021.  parameters have no effect on data file plotting.
  3022.  
  3023.  An isoline is a curve parameterized by one of the surface parameters while
  3024.  the other surface parameter is fixed.  Isolines provide a simple means to
  3025.  display a surface.  By fixing the u parameter of surface s(u,v), the iso-u
  3026.  lines of the form c(v) = s(u0,v) are produced, and by fixing the v parameter,
  3027.  the iso-v lines of the form c(u) = s(u,v0) are produced.
  3028.  
  3029.  When a surface plot is being done without the removal of hidden lines, `set
  3030.  samples` also has an effect on the number of points being evaluated---it
  3031.  controls the number of points sampled along each isoline.  See `set samples`.
  3032. ?set key
  3033. ?set nokey
  3034. ?show key
  3035. ?key
  3036. ?nokey
  3037. ?legend
  3038.  The `set key` enables a key (or legend) describing plots on a plot.
  3039.  
  3040.  The contents of the key, i.e., the names given to each plotted data set and
  3041.  function and samples of the lines and/or symbols used to represent them, are
  3042.  determined by the `title` and `with` options of the {`s`}`plot` command.
  3043.  Please see `plot title` and `plot with` for more information.
  3044.  
  3045.  Syntax:
  3046.        set key {  left | right | top | bottom | outside | below
  3047.                 | <position>}
  3048.                {Left | Right} {{no}reverse}
  3049.                {samplen <sample_length>} {spacing <vertical_spacing>}
  3050.                {width <width_increment>}
  3051.                {title "<text>"} {{no}box {<linetype>}}
  3052.        set nokey
  3053.        show key
  3054.  
  3055.  By default the key is placed in the upper right corner of the graph.  The
  3056.  keywords `left`, `right`, `top`, `bottom`, `outside` and `below` may be used
  3057.  to place the key in the other corners inside the graph or to the right
  3058.  (outside) or below the graph.  They may be given alone or combined.
  3059.  
  3060.  Justification of the labels within the key is controlled by `Left` or `Right`
  3061.  (default is `Right`).  The text and sample can be reversed (`reverse`) and a
  3062.  box can be drawn around the key (`box {<linetype>}`) in a specified linetype.
  3063.  But note that <linetype> is an index in the default linetype list provided by
  3064.  the terminal; user-defined linetypes (via the `set linestyle` command) are
  3065.  not accessible for the key box.
  3066.  
  3067.  The length of the sample line can be controlled by `samplen`.  The sample
  3068.  length is computed as the sum of the tic length and <sample_length> times the
  3069.  character width.  `samplen` also affects the positions of point samples in
  3070.  the key since these are drawn at the midpoint of the sample line, even if it
  3071.  is not drawn.  <sample_length> must be an integer.
  3072.  
  3073.  The vertical spacing between lines is controlled by `spacing`.  The spacing
  3074.  is set equal to the product of the pointsize, the vertical tic size, and
  3075.  <vertical_spacing>.  The program will guarantee that the vertical spacing is
  3076.  no smaller than the character height.
  3077.  
  3078.  The <width_increment> is a number of character widths to be added to or
  3079.  subtracted from the length of the string.  This is useful only when you are
  3080.  putting a box around the key and you are using control characters in the text.
  3081.  `gnuplot` simply counts the number of characters in the string when computing
  3082.  the box width; this allows you to correct it.
  3083.  
  3084.  A title can be put on the key (`title "<text>"`)---see also `syntax` for the
  3085.  distinction between text in single- or double-quotes.  The key title uses the
  3086.  same justification as do the plot titles.
  3087.  
  3088.  The defaults for `set key` are `right`, `top`, `Right`, `noreverse`, `samplen
  3089.  4`, `spacing 1.25`, `title ""`, and `nobox`.  The default <linetype> is the
  3090.  same as that used for the plot borders.  Entering `set key` with no options
  3091.  returns the key to its default configuration.
  3092.  
  3093.  The <position> can be a simple x,y,z as in previous versions, but these can
  3094.  be preceded by one of four keywords (`first`, `second`, `graph`, `screen`)
  3095.  which selects the coordinate system in which the position is specified.  See
  3096.  `coordinates` for more details.
  3097.  
  3098.  The key is drawn as a sequence of lines, with one plot described on each
  3099.  line.  On the right-hand side (or the left-hand side, if `reverse` is
  3100.  selected) of each line is a representation that attempts to mimic the way the
  3101.  curve is plotted.  On the other side of each line is the text description
  3102.  (the line title), obtained from the `plot` command.  The lines are vertically
  3103.  arranged so that an imaginary straight line divides the left- and right-hand
  3104.  sides of the key.  It is the coordinates of the top of this line that are
  3105.  specified with the `set key` command.  In a `plot`, only the x and y
  3106.  coordinates are used to specify the line position.  For a `splot`, x, y and
  3107.  z are all used as a 3-d location mapped using the same mapping as the graph
  3108.  itself to form the required 2-d screen position of the imaginary line.
  3109.  
  3110.  Some or all of the key may be outside of the graph boundary, although this
  3111.  may interfere with other labels and may cause an error on some devices.  If
  3112.  you use the keywords `outside` or `below`, `gnuplot` makes space for the keys
  3113.  and the graph becomes smaller.  Putting keys outside to the right, they
  3114.  occupy as few columns as possible, and putting them below, as many columns as
  3115.  possible (depending of the length of the labels), thus stealing as little
  3116.  space from the graph as possible.
  3117.  
  3118.  When using the TeX or PostScript drivers, or similar drivers where formatting
  3119.  information is embedded in the string, `gnuplot` is unable to calculate
  3120.  correctly the width of the string for key positioning.  If the key is to be
  3121.  positioned at the left, it may be convenient to use the combination  `set key
  3122.  left Left reverse`.  The box and gap in the grid will be the width of the
  3123.  literal string.
  3124.  
  3125.  If `splot` is being used to draw contours, the contour labels will be listed
  3126.  in the key.  If the alignment of these labels is poor or a different number
  3127.  of decimal places is desired, the label format can be specified.  See `set
  3128.  clabel` for details.
  3129.  
  3130.  Examples:
  3131.  
  3132.  This places the key at the default location:
  3133.        set key
  3134.  
  3135.  This disables the key:
  3136.        set nokey
  3137.  
  3138.  This places a key at coordinates 2,3.5,2 in the default (first) coordinate
  3139.  system:
  3140.        set key 2,3.5,2
  3141.  
  3142.  This places the key below the graph:
  3143.        set key below
  3144.  
  3145.  This places the key in the bottom left corner, left-justifies the text,
  3146.  gives it a title, and draws a box around it in linetype 3:
  3147.        set key left bottom Left title 'Legend' box 3
  3148. ?set label
  3149. ?set nolabel
  3150. ?show label
  3151. ?label
  3152. ?nolabel
  3153.  Arbitrary labels can be placed on the plot using the `set label` command.
  3154.  
  3155.  Syntax:
  3156.        set label {<tag>} {"<label_text>"} {at <position>}
  3157.                  {<justification>} {{no}rotate} {font "<name><,size>"}
  3158.        set nolabel {<tag>}
  3159.        show label
  3160.  
  3161.  The <position> is specified by either x,y or x,y,z, and may be preceded by
  3162.  `first`, `second`, `graph`, or `screen` to select the coordinate system.
  3163.  See `coordinates` for details.
  3164.  
  3165.  The tag is an integer that is used to identify the label. If no <tag> is
  3166.  given, the lowest unused tag value is assigned automatically.  The tag can be
  3167.  used to delete or modify a specific label.  To change any attribute of an
  3168.  existing label, use the `set label` command with the appropriate tag, and
  3169.  specify the parts of the label to be changed.
  3170.  
  3171.  By default, the text is placed flush left against the point x,y,z.  To adjust
  3172.  the way the label is positioned with respect to the point x,y,z, add the
  3173.  parameter <justification>, which may be `left`, `right` or `center`,
  3174.  indicating that the point is to be at the left, right or center of the text.
  3175.  Labels outside the plotted boundaries are permitted but may interfere with
  3176.  axis labels or other text.
  3177.  
  3178.  If `rotate` is given, the label is written vertically (if the terminal can do
  3179.  so, of course).
  3180.  
  3181.  If one (or more) axis is timeseries, the appropriate coordinate should be
  3182.  given as a quoted time string according to the `timefmt` format string.  See
  3183.  `set xdata` and `set timefmt`.
  3184.  
  3185.  The EEPIC, Imagen, LaTeX, and TPIC drivers allow \\ in a string to specify
  3186.  a newline.
  3187.  
  3188.  Examples:
  3189.  
  3190.  To set a label at (1,2) to "y=x", use:
  3191.        set label "y=x" at 1,2
  3192.  
  3193.  To set a label of the sign Sigma of size 24 at the center of the graph, use:
  3194.        set label "S" at graph 0.5,0.5 center font "Symbol,24"
  3195.  
  3196.  To set a label "y=x^2" with the right of the text at (2,3,4), and tag the
  3197.  label as number 3, use:
  3198.        set label 3 "y=x^2" at 2,3,4 right
  3199.  
  3200.  To change the preceding label to center justification, use:
  3201.        set label 3 center
  3202.  
  3203.  To delete label number 2, use:
  3204.        set nolabel 2
  3205.  
  3206.  To delete all labels, use:
  3207.        set nolabel
  3208.  
  3209.  To show all labels (in tag order), use:
  3210.        show label
  3211.  
  3212.  To set a label on a graph with a timeseries on the x axis, use, for example:
  3213.        set timefmt "%d/%m/%y,%H:%M"
  3214.        set label "Harvest" at "25/8/93",1
  3215. ?set linestyle
  3216. ?set nolinestyle
  3217. ?show linestyle
  3218. ?linestyle
  3219.  Each terminal has a default set of line and point types, which can be seen
  3220.  by using the command `test`.  `set linestyle` defines a set of line types
  3221.  and widths and point types and sizes so that you can refer to them later by
  3222.  an index instead of repeating all the information at each invocation.
  3223.  
  3224.  Syntax:
  3225.        set linestyle <index> {linetype | lt <line_type>}
  3226.                              {linewidth | lw <line_width>}
  3227.                              {pointtype | pt <point_type>}
  3228.                              {pointsize | ps <point_size>}
  3229.        set nolinestyle
  3230.        show linestyle
  3231.  
  3232.  The line and point types are taken from the default types for the terminal
  3233.  currently in use.  The line width and point size are multipliers for the
  3234.  default width and size (but note that <point_size> here is unaffected by
  3235.  the multiplier given on 'set pointsize').
  3236.  
  3237.  The defaults for the line and point types is the index.  The defaults for
  3238.  the width and size are both unity.
  3239.  
  3240.  Linestyles created by this mechanism do not replace the default styles;
  3241.  both may be used.
  3242.  
  3243.  Not all terminals support the line width and point size features, so these
  3244.  terminals obviously cannot fully support `set linestyle`.
  3245.  
  3246.  Note that this feature is not completely installed; linestyles defined by
  3247.  this mechanism may be used with 'plot', 'splot', 'replot', and 'set arrow',
  3248.  but not by other commands that allow the default index to be used, such as
  3249.  'set grid'.
  3250.  
  3251.  Example:
  3252.  Suppose that the default lines for indices 1, 2, and 3 are red, green, and
  3253.  blue, respectively, and the default point shapes for the same indices are a
  3254.  square, a cross, and a triangle, respectively.  Then
  3255.  
  3256.        set linestyle 1 lt 2 lw 2 pt 3 ps 0.5
  3257.  
  3258.  defines a new linestyle that is green and twice the default width and a new
  3259.  pointstyle that is a half-sized triangle.  The commands
  3260.  
  3261.        set function style lines
  3262.        plot f(x) lt 3, g(x) ls 1
  3263.  
  3264.  will create a plot of f(x) using the default blue line and a plot of g(x)
  3265.  using the user-defined wide green line.  Similarly the commands
  3266.  
  3267.        set function style linespoints
  3268.        plot p(x) lt 1 pt 3, q(x) ls 1
  3269.  
  3270.  will create a plot of f(x) using the default triangles connected by a red
  3271.  line and q(x) using small triangles connected by a green line.
  3272. ?set lmargin
  3273. ?lmargin
  3274.  The command `set lmargin` sets the size of the left margin.  Please see
  3275.  `set margin` for details.
  3276. ?set locale
  3277. ?show logscale
  3278. ?locale
  3279.  The `locale` setting determines the language with which `{x,y,z}{d,m}tics`
  3280.  will write the days and months.
  3281.  
  3282.  Syntax:
  3283.        set locale {"<locale>"}
  3284.  
  3285.  <locale> may be any language designation acceptable to your installation.
  3286.  See your system documentation for the available options.  The default value
  3287.  is determined from the LANG environment variable.
  3288. ?set logscale
  3289. ?set nologscale
  3290. ?show logscale
  3291. ?logscale
  3292. ?nologscale
  3293.  Log scaling may be set on the x, y, z, x2 and/or y2 axes.
  3294.  
  3295.  Syntax:
  3296.        set logscale <axes> <base>
  3297.        set nologscale <axes>
  3298.        show logscale
  3299.  
  3300.  where <axes> may be any combinations of `x`, `y`, and `z`, in any order, or
  3301.  `x2` or `y2` and where <base> is the base of the log scaling.  If <base> is
  3302.  not given, then 10 is assumed.  If <axes> is not given, then all axes are
  3303.  assumed.  `set nologscale` turns off log scaling for the specified axes.
  3304.  
  3305.  Examples:
  3306.  
  3307.  To enable log scaling in both x and z axes:
  3308.        set logscale xz
  3309.  
  3310.  To enable scaling log base 2 of the y axis:
  3311.        set logscale y 2
  3312.  
  3313.  To disable z axis log scaling:
  3314.        set nologscale z
  3315. ?set mapping
  3316. ?show mapping
  3317. ?mapping
  3318.  If data are provided to `splot` in spherical or cylindrical coordinates,
  3319.  the `set mapping` command should be used to instruct `gnuplot` how to
  3320.  interpret them.
  3321.  
  3322.  Syntax:
  3323.        set mapping {cartesian | spherical | cylindrical}
  3324.  
  3325.  A cartesian coordinate system is used by default.
  3326.  
  3327.  For a spherical coordinate system, the data occupy two or three columns (or
  3328.  `using` entries).  The first two are interpreted as the polar and azimuthal
  3329.  angles theta and phi (in the units specified by `set angles`).  The radius r
  3330.  is taken from the third column if there is one, or is set to unity if there
  3331.  is no third column.  The mapping is:
  3332.  
  3333.        x = r * cos(theta) * cos(phi)
  3334.        y = r * sin(theta) * cos(phi)
  3335.        z = r * sin(phi)
  3336.  
  3337.  Note that this is a "geographic" spherical system, rather than a "polar" one.
  3338.  
  3339.  For a cylindrical coordinate system, the data again occupy two or three
  3340.  columns.  The first two are interpreted as theta (in the units specified by
  3341.  `set angles`) and z.  The radius is either taken from the third column or set
  3342.  to unity, as in the spherical case.  The mapping is:
  3343.  
  3344.        x = r * cos(theta)
  3345.        y = r * sin(theta)
  3346.        z = z
  3347.  
  3348.  The effects of `mapping` can be duplicated with the `using` filter on the
  3349.  `splot` command, but `mapping` may be more convenient if many data files are
  3350.  to be processed.  However even if `mapping` is used, `using` may still be
  3351.  necessary if the data in the file are not in the required order.
  3352.  
  3353.  `mapping` has no effect on `plot`s.
  3354. ?set margin
  3355. ?show margin
  3356. ?margin
  3357.  Normally the margins of the plot are automatically calculated based on tics
  3358.  and axis labels.  These computed values can be overridden by the `set margin`
  3359.  commands.  `show margin` shows the current settings.
  3360.  
  3361.  Syntax:
  3362.        set bmargin {<margin>}
  3363.        set lmargin {<margin>}
  3364.        set rmargin {<margin>}
  3365.        set tmargin {<margin>}
  3366.        show margin
  3367.  
  3368.  The units of <margin> are character heights or widths, as appropriate.  A
  3369.  positive value defines the absolute size of the margin.  A negative value (or
  3370.  none) causes `gnuplot` to revert to the computed value.
  3371. ?set missing
  3372. ?missing
  3373.  The `set missing` command allows you to tell `gnuplot` what character is
  3374.  used in a data file to denote missing data.
  3375.  
  3376.  Syntax:
  3377.        set missing {"<character>"}
  3378.        show missing
  3379.  
  3380.  Example:
  3381.        set missing "?"
  3382.  
  3383.  would mean that, when plotting a file containing
  3384.  
  3385.           1 1
  3386.           2 ?
  3387.           3 2
  3388.  
  3389.  the middle line would be ignored.
  3390.  
  3391.  There is no default character for `missing`.
  3392. ?set multiplot
  3393. ?multiplot
  3394. ?set nomultiplot
  3395.  The command `set multiplot` places `gnuplot` in the multiplot mode, in which
  3396.  several plots are placed on the same page, window, or screen.
  3397.  
  3398.  Syntax:
  3399.        set multiplot
  3400.        set nomultiplot
  3401.  
  3402.  For some terminals, no plot is displayed until the command `set nomultiplot`
  3403.  is given, which causes the entire page to be drawn and then returns `gnuplot`
  3404.  to its normal single-plot mode.  For other terminals, each separate `plot`
  3405.  command produces a plot, but the screen may not be cleared between plots.
  3406.  
  3407.  Any labels or arrows that have been defined will be drawn for each plot
  3408.  according to the current size and origin (unless their coordinates are
  3409.  defined in the `screen` system).  Just about everything else that can be
  3410.  `set` is applied to each plot, too.  If you want something to appear only
  3411.  once on the page, for instance a single time stamp, you'll need to put a `set
  3412.  time`/`set notime` pair around one of the `plot`, `splot` or `replot`
  3413.  commands within the `set multiplot`/`set nomultiplot` block.
  3414.  
  3415.  The commands `set origin` and `set size` must be used to correctly position
  3416.  each plot; see `set origin` and `set size` for details of their usage.
  3417.  
  3418.  Example:
  3419.        set size 0.7,0.7
  3420.        set origin 0.1,0.1
  3421.        set multiplot
  3422.        set size 0.4,0.4
  3423.        set origin 0.1,0.1
  3424.        plot sin(x)
  3425.        set size 0.2,0.2
  3426.        set origin 0.5,0.5
  3427.        plot cos(x)
  3428.        set nomultiplot
  3429.  
  3430.  displays a plot of cos(x) stacked above a plot of sin(x).  Note the initial
  3431.  `set size` and `set origin`.  While these are not always required, their
  3432.  inclusion is recommended.  Some terminal drivers require that bounding box
  3433.  information be available before any plots can be made, and the form given
  3434.  above guarantees that the bounding box will include the entire plot array
  3435.  rather than just the bounding box of the first plot.
  3436.  
  3437.  `set size` and `set origin` refer to the entire plotting area used for each
  3438.  plot.  If you want to have the axes themselves line up, perhaps to avoid
  3439.  having to label all of them, you need to guarantee that the margins are the
  3440.  same size.  This can be done with the `set margin` commands.  Please see `set
  3441.  margin` for their use.
  3442. ?set mx2tics
  3443. ?set nomx2tics
  3444. ?show mx2tics
  3445. ?mx2tics
  3446. ?nomx2tics
  3447.  Minor tic marks along the x2 (top) axis are controlled by `set mx2tics`.
  3448.  Please see `set mxtics`.
  3449. ?set mxtics
  3450. ?set nomxtics
  3451. ?show mxtics
  3452. ?mxtics
  3453. ?nomxtics
  3454.  Minor tic marks along the x axis are controlled by `set mxtics`.  They can be
  3455.  turned off with `set nomxtics`.  Similar commands control minor tics along
  3456.  the other axes.
  3457.  
  3458.  Syntax:
  3459.        set mxtics {<freq> | default}
  3460.        set nomxtics
  3461.        show mxtics
  3462.  
  3463.  The same syntax applies to `mytics`, `mztics`, `mx2tics` and `my2tics`.
  3464.  
  3465.  <freq> is the number of sub-intervals (NOT the number of minor tics) between
  3466.  major tics (ten is the default for a linear axis, so there are nine minor
  3467.  tics between major tics). Selecting `default` will return the number of minor
  3468.  ticks to its default value.
  3469.  
  3470.  If the axis is logarithmic, the number of sub-intervals will be set to a
  3471.  reasonable number by default (based upon the length of a decade).  This will
  3472.  be overridden if <freq> is given.  However the usual minor tics (2, 3, ...,
  3473.  8, 9 between 1 and 10, for example) are obtained by setting <freq> to 10,
  3474.  even though there are but nine sub-intervals.
  3475.  
  3476.  Minor tics can be used only with uniformly spaced major tics.  Since major
  3477.  tics can be placed arbitrarily by `set {x|x2|y|y2|z}tics`, minor tics cannot
  3478.  be used if major tics are explicitly `set`.
  3479.  
  3480.  By default, minor tics are off for linear axes and on for logarithmic axes.
  3481.  They inherit the settings for `axis|border` and `{no}mirror` specified for
  3482.  the major tics.  Please see `set xtics` for information about these.
  3483. ?set my2tics
  3484. ?set nomy2tics
  3485. ?show my2tics
  3486. ?my2tics
  3487. ?nomy2tics
  3488.  Minor tic marks along the y2 (right-hand) axis are controlled by `set
  3489.  my2tics`.  Please see `set mxtics`.
  3490. ?set mytics
  3491. ?set nomytics
  3492. ?show mytics
  3493. ?mytics
  3494. ?nomytics
  3495.  Minor tic marks along the y axis are controlled by `set mytics`.  Please
  3496.  see `set mxtics`.
  3497. ?set mztics
  3498. ?set nomztics
  3499. ?show mztics
  3500. ?mztics
  3501. ?nomztics
  3502.  Minor tic marks along the z axis are controlled by `set mztics`.  Please
  3503.  see `set mxtics`.
  3504. ?set offsets
  3505. ?set nooffsets
  3506. ?show offsets
  3507. ?offsets
  3508. ?nooffsets
  3509.  Offsets provide a mechanism to put a boundary around the data inside of an
  3510.  autoscaled graph.
  3511.  
  3512.  Syntax:
  3513.        set offsets <left>, <right>, <top>, <bottom>
  3514.        set nooffsets
  3515.        show offsets
  3516.  
  3517.  Each offset may be a constant or an expression.  Each defaults to 0.  Left
  3518.  and right offsets are given in units of the x axis, top and bottom offsets in
  3519.  units of the y axis.  A positive offset expands the graph in the specified
  3520.  direction, e.g., a positive bottom offset makes ymin more negative.  Negative
  3521.  offsets, while permitted, can have unexpected interactions with autoscaling
  3522.  and clipping.
  3523.  
  3524.  Offsets are ignored in `splot`s.
  3525.  
  3526.  Example:
  3527.        set offsets 0, 0, 2, 2
  3528.        plot sin(x)
  3529.  
  3530.  This graph of sin(x) will have a y range [-3:3] because the function
  3531.  will be autoscaled to [-1:1] and the vertical offsets are each two.
  3532. ?set origin
  3533. ?show origin
  3534. ?origin
  3535.  The `set origin` command is used to specify the origin of a plotting surface
  3536.  (i.e., the graph and its margins) on the screen.  The coordinates are given
  3537.  in the `screen` coordinate system (see `coordinates` for information about
  3538.  this system).
  3539.  
  3540.  Syntax:
  3541.        set origin <x-origin>,<y-origin>
  3542. ?set output
  3543. ?show output
  3544. ?output
  3545.  By default, screens are displayed to the standard output. The `set output`
  3546.  command redirects the display to the specified file or device.
  3547.  
  3548.  Syntax:
  3549.        set output {"<filename>"}
  3550.        show output
  3551.  
  3552.  The filename must be enclosed in quotes.  If the filename is omitted, any
  3553.  output file opened by a previous invocation of `set output` will be closed
  3554.  and new output will be sent to STDOUT.  (If you give the command `set output
  3555.  "STDOUT"`, your output may be sent to a file named "STDOUT"!  ["May be", not
  3556.  "will be", because some terminals, like `x11`, ignore `set output`.])
  3557.  
  3558.  MSDOS users should note that the \ character has special significance in
  3559.  double-quoted strings, so single-quotes should be used for filenames in
  3560.  different directories.
  3561.  
  3562.  When both `set terminal` and `set output` are used together, it is safest to
  3563.  give `set terminal` first, because some terminals set a flag which is needed
  3564.  in some operating systems.  This would be the case, for example, if the
  3565.  operating system needs to know whether or not a file is to be formatted in
  3566.  order to open it properly.
  3567.  
  3568.  On machines with popen functions (Unix), output can be piped through a shell
  3569.  command if the first character of the filename is '|'.  For instance,
  3570.  
  3571.        set output "|lpr -Plaser filename"
  3572.        set output "|lp -dlaser filename"
  3573.  
  3574.  On MSDOS machines, `set output "PRN"` will direct the output to the default
  3575.  printer.  On VMS, output can be sent directly to any spooled device.  It is
  3576.  also possible to send the output to DECnet transparent tasks, which allows
  3577.  some flexibility.
  3578. ?set parametric
  3579. ?set noparametric
  3580. ?show parametric
  3581. ?parametric
  3582. ?noparametric
  3583.  The `set parametric` command changes the meaning of `plot` (`splot`) from
  3584.  normal functions to parametric functions.  The command `set noparametric`
  3585.  restores the plotting style to normal, single-valued expression plotting.
  3586.  
  3587.  Syntax:
  3588.        set parametric
  3589.        set noparametric
  3590.        show parametric
  3591.  
  3592.  For 2-d plotting, a parametric function is determined by a pair of parametric
  3593.  functions operating on a parameter.  An example of a 2-d parametric function
  3594.  would be `plot sin(t),cos(t)`, which draws a circle (if the aspect ratio is
  3595.  set correctly---see `set size`).  `gnuplot` will display an error message if
  3596.  both functions are not provided for a parametric `plot`.
  3597.  
  3598.  For 3-d plotting, the surface is described as x=f(u,v), y=g(u,v), z=h(u,v).
  3599.  Therefore a triplet of functions is required.  An example of a 3-d parametric
  3600.  function would be `cos(u)*cos(v),cos(u)*sin(v),sin(u)`, which draws a sphere.
  3601.  `gnuplot` will display an error message if all three functions are not
  3602.  provided for a parametric `splot`.
  3603.  
  3604.  The total set of possible plots is a superset of the simple f(x) style plots,
  3605.  since the two functions can describe the x and y values to be computed
  3606.  separately.  In fact, plots of the type t,f(t) are equivalent to those
  3607.  produced with f(x) because the x values are computed using the identity
  3608.  function.  Similarly, 3-d plots of the type u,v,f(u,v) are equivalent to
  3609.  f(x,y).
  3610.  
  3611.  Note that the order the parametric functions are specified is xfunction,
  3612.  yfunction (and zfunction) and that each operates over the common parametric
  3613.  domain.
  3614.  
  3615.  Also, the `set parametric` function implies a new range of values.  Whereas
  3616.  the normal f(x) and f(x,y) style plotting assume an xrange and yrange (and
  3617.  zrange), the parametric mode additionally specifies a trange, urange, and
  3618.  vrange.  These ranges may be set directly with `set trange`, `set urange`,
  3619.  and `set vrange`, or by specifying the range on the `plot` or `splot`
  3620.  commands.  Currently the default range for these parametric variables is
  3621.  [-5:5].  Setting the ranges to something more meaningful is expected.
  3622. ?set pointsize
  3623. ?show pointsize
  3624. ?pointsize
  3625.  The `set pointsize` command changes the size of the points used in plots.
  3626.  
  3627.  Syntax:
  3628.        set pointsize <pointsize>
  3629.        show pointsize
  3630.  
  3631.  Default is pointsize 1.0.  Larger pointsizes (>1.0) are useful for high
  3632.  resolution in bitmapped graphics.
  3633.  
  3634.  The pointsize of a single plot may be changed on the `plot` command.  See
  3635.  `plot with` for details.
  3636.  
  3637.  Please note that the pointsize setting is not supported with all terminal
  3638.  types.
  3639. ?set polar
  3640. ?set nopolar
  3641. ?show polar
  3642. ?polar
  3643. ?nopolar
  3644.  The `set polar` command changes the meaning of the plot from rectangular
  3645.  coordinates to polar coordinates.
  3646.  
  3647.  Syntax:
  3648.        set polar
  3649.        set nopolar
  3650.        show polar
  3651.  
  3652.  There have been changes made to polar mode in version 3.6, so that scripts
  3653.  for `gnuplot` versions 3.5 and earlier will require modification.  The main
  3654.  change is that the dummy variable t is used for the angle so that the x and
  3655.  y ranges can be controlled independently.  Other changes are:
  3656.  1) tics are no longer put along the zero axes automatically
  3657.  ---use `set xtics axis nomirror`; `set ytics axis nomirror`;
  3658.  2) the grid, if selected, is not automatically polar
  3659.  ---use `set grid polar`;
  3660.  3) the grid is not labelled with angles
  3661.  ---use `set label` as necessary.
  3662.  
  3663.  In polar coordinates, the dummy variable (t) is an angle.  The default range
  3664.  of t is [0:2*pi], or, if degree units have been selected, to [0:360] (see
  3665.  `set angles`).
  3666.  
  3667.  The command `set nopolar` changes the meaning of the plot back to the default
  3668.  rectangular coordinate system.
  3669.  
  3670.  The `set polar` command is not supported for `splot`s.  See the `set mapping`
  3671.  command for similar functionality for `splot`s.
  3672.  
  3673.  While in polar coordinates the meaning of an expression in t is really
  3674.  r = f(t), where t is an angle of rotation.  The trange controls the domain
  3675.  (the angle) of the function, and the x and y ranges control the range of the
  3676.  graph in the x and y directions.  Each of these ranges, as well as the
  3677.  rrange, may be autoscaled or set explicitly.  See `set xrange` for details
  3678.  of all the `set range` commands.
  3679.  
  3680.  Example:
  3681.        set polar
  3682.        plot t*sin(t)
  3683.        plot [-2*pi:2*pi] [-3:3] [-3:3] t*sin(t)
  3684.  
  3685.  The first `plot` uses the default polar angular domain of 0 to 2*pi.  The
  3686.  radius and the size of the graph are scaled automatically.  The second `plot`
  3687.  expands the domain, and restricts the size of the graph to [-3:3] in both
  3688.  directions.
  3689.  
  3690.  You may want to `set size square` to have `gnuplot` try to make the aspect
  3691.  ratio equal to unity, so that circles look circular.
  3692. ?set rmargin
  3693. ?rmargin
  3694.  The command `set rmargin` sets the size of the right margin.  Please see
  3695.  `set margin` for details.
  3696. ?set rrange
  3697. ?show rrange
  3698. ?rrange
  3699.  The `set rrange` command sets the range of the radial coordinate for a
  3700.  graph in polar mode.  Please see `set xrange` for details.
  3701. ?set samples
  3702. ?show samples
  3703. ?samples
  3704.  The sampling rate of functions may be changed by the `set samples` command.
  3705.  
  3706.  Syntax:
  3707.        set samples <samples_1> {,<samples_2>}
  3708.        show samples
  3709.  
  3710.  By default, sampling is set to 100 points.  A higher sampling rate will
  3711.  produce more accurate plots, but will take longer.  This parameter has no
  3712.  effect on data-file plotting unless one of the `smooth` options is used.
  3713.  
  3714.  When a 2-d graph is being done, only the value of <samples_1> is relevant.
  3715.  
  3716.  When a surface plot is being done without the removal of hidden lines, the
  3717.  value of samples specifies the number of samples that are to be evaluated for
  3718.  isoline.  Each iso-v line will have <sample_1> samples and each iso-u line
  3719.  will have <sample_2> samples.  If you only specify <samples_1>, <samples_2>
  3720.  will be set to the same value as <samples_1>.  See also `set isosamples`.
  3721. ?set size
  3722. ?show size
  3723. ?size
  3724.  The `set size` command scales the displayed size of the plot.
  3725.  
  3726.  Syntax:
  3727.        set size {{no}square | ratio <r> | noratio} {<xscale>,<yscale>}
  3728.        show size
  3729.  
  3730.  The <xscale> and <yscale> values are the scaling factors for the size of the
  3731.  plot, which includes the graph and the margins.
  3732.  
  3733.  `ratio` causes `gnuplot` to try to create a graph with an aspect ratio of <r>
  3734.  (the ratio of the y-axis length to the x-axis length) within the portion of
  3735.  the plot specified by <xscale> and <yscale>.
  3736.  
  3737.  The meaning of a negative value for <r> is different.  If <r>=-1, gnuplot
  3738.  tries to set the scales so that the unit has the same length on both the x
  3739.  and y axes (suitable for geographical data, for instance).  If <r>=-2, the
  3740.  unit on y has twice the length of the unit on x, and so on.
  3741.  
  3742.  The success of `gnuplot` in producing the requested aspect ratio depends on
  3743.  the terminal selected.  The graph area will be the largest rectangle of
  3744.  aspect ratio <r> that will fit into the specified portion of the output
  3745.  (leaving adequate margins, of course).
  3746.  
  3747.  `square` is a synonym for `ratio 1`.
  3748.  
  3749.  Both `noratio` and `nosquare` return the graph to its default aspect ratio
  3750.  (1.0), but do not return <xscale> or <yscale> to their default values (also
  3751.  1.0).
  3752.  
  3753.  `ratio` and `square` have no effect on 3-d plots.
  3754.  
  3755.  `set size` is relative to the default size, which differs from terminal to
  3756.  terminal.  Since `gnuplot` fills as much of the available plotting area as
  3757.  possible by default, it is safer to use `set size` to decrease the size of
  3758.  a plot than to increase it.  See `set terminal` for the default sizes.
  3759.  
  3760.  On some terminals, changing the size of the plot will result in text being
  3761.  misplaced.
  3762.  
  3763.  Examples:
  3764.  
  3765.  To set the size to normal size use:
  3766.        set size 1,1
  3767.  
  3768.  To make the graph half size and square use:
  3769.        set size square 0.5,0.5
  3770.  
  3771.  To make the graph twice as high as wide use:
  3772.        set size ratio 2
  3773.  
  3774. ?set function style
  3775. ?show function style
  3776. ?set data style
  3777. ?show data style
  3778. ?set style
  3779. ?show style
  3780.  Default styles are chosen with the `set function style` and `set data style`
  3781.  commands.  See `plot with` for information about how to override the default
  3782.  plotting style for individual functions and data sets.
  3783.  
  3784.  Syntax:
  3785.        set function style <style>
  3786.        set data style <style>
  3787.        show function style
  3788.        show data style
  3789.  
  3790.  The types used for all line and point styles (i.e., solid, dash-dot, color,
  3791.  etc. for lines; circles, squares, crosses, etc. for points) will be either
  3792.  those specified on the `plot` or `splot` command or will be chosen
  3793.  sequentially from the types available to the terminal in use.  Use the
  3794.  command `test` to see what is available.
  3795.  
  3796.  None of the styles requiring more than two columns of information (e.g.,
  3797.  `errorbars`) can be used with `splot`s or function `plot`s.  Neither `boxes`
  3798.  nor any of the `steps` styles can be used with `splot`s.  If an inappropriate
  3799.  style is specified, it will be changed to `points`.
  3800.  
  3801.  For 2-d data with more than two columns, `gnuplot` is picky about the allowed
  3802.  `errorbar` styles.  The `using` option on the `plot` command can be used to
  3803.  set up the correct columns for the style you want.  (In this discussion,
  3804.  "column" will be used to refer both to a column in the data file and an entry
  3805.  in the `using` list.)
  3806.  
  3807.  For three columns, only `xerrorbars`, `yerrorbars` (or `errorbars`), `boxes`,
  3808.  and `boxerrorbars` are allowed.  If another plot style is used, the style
  3809.  will be changed to `yerrorbars`.  The `boxerrorbars` style will calculate the
  3810.  boxwidth automatically.
  3811.  
  3812.  For four columns, only `xerrorbars`, `yerrorbars` (or `errorbars`),
  3813.  `xyerrorbars`, `boxxyerrorbars`, and `boxerrorbars` are allowed.  An illegal
  3814.  style will be changed to `yerrorbars`.
  3815.  
  3816.  Five-column data allow only the `boxerrorbars`, `financebars`, and
  3817.  `candlesticks` styles.  (The last two of these are primarily used for plots
  3818.  of financial prices.)  An illegal style will be changed to `boxerrorbars`
  3819.  before plotting.
  3820.  
  3821.  Six- and seven-column data only allow the `xyerrorbars` and `boxxyerrorbars`
  3822.  styles.  Illegal styles will be changed to `xyerrorbars` before plotting.
  3823.  
  3824.  For more information about error bars, please see `plot errorbars`.
  3825. ?set style boxerrorbars
  3826. ?style boxerrorbars
  3827. ?boxerrorbars
  3828.  The `boxerrorbars` style is only relevant to 2-d data plotting.  It is a
  3829.  combination of the `boxes` and `yerrorbars` styles.  The boxwidth will come
  3830.  from the fourth column if the y errors are in the form of "ydelta" and the
  3831.  boxwidth was not previously set equal to -2.0 (`set boxwidth -2.0`) or from
  3832.  the fifth column if the y errors are in the form of "ylow yhigh".  The
  3833.  special case  `boxwidth = -2.0` is for four-column data with y errors in the
  3834.  form "ylow yhigh".  In this case the boxwidth will be calculated so that each
  3835.  box touches the adjacent boxes.  The width will also be calculated in cases
  3836.  where three-column data are used.
  3837.  
  3838.  The box height is determined from the y error in the same way as it is for
  3839.  the `yerrorbars` style---either from y-ydelta to y+ydelta or from ylow to
  3840.  yhigh, depending on how many data columns are provided.
  3841. ?set style boxes
  3842. ?style boxes
  3843. ?boxes
  3844. ?set style bargraph
  3845. ?style bargraph
  3846. ?bargraph
  3847.  The `boxes` style is only relevant to 2-d plotting.  It draws a box centered
  3848.  about the given x coordinate from the x axis (not the graph border) to the
  3849.  given y coordinate.  The width of the box is obtained in one of three ways.
  3850.  If it is a data plot and the data file has a third column, this will be used
  3851.  to set the width of the box.  If not, if a width has been set using the `set
  3852.  boxwidth` command, this will be used.  If neither of these is available, the
  3853.  width of each box will be calculated automatically so that it touches the
  3854.  adjacent boxes.
  3855. ?set style boxxyerrorbars
  3856. ?style boxxyerrorbars
  3857. ?boxxyerrorbars
  3858.  The `boxxyerrorbars` style is only relevant to 2-d data plotting.  It is a
  3859.  combination of the `boxes` and `xyerrorbars` styles.
  3860.  
  3861.  The box width and height are determined from the x and y errors in the same
  3862.  way as they are for the `xyerrorbars` style---either from xlow to xhigh and
  3863.  from ylow to yhigh, or from x-xdelta to x+xdelta and from y-ydelta to
  3864.  y+ydelta , depending on how many data columns are provided.
  3865. ?set style candlesticks
  3866. ?style candlesticks
  3867. ?candlesticks
  3868.  The `candlesticks` style is only relevant for 2-d data plotting of financial
  3869.  data.  Five columns of data are required; in order, these should be the x
  3870.  coordinate (most likely a date) and the opening, low, high, and closing
  3871.  prices.  The symbol is an open rectangle, centered horizontally at the x
  3872.  coordinate and limited vertically by the opening and closing prices.  A
  3873.  vertical line segment at the x coordinate extends up from the top of the
  3874.  rectangle to the high price and another down to the low.  The width of the
  3875.  rectangle may be changed by `set bar`.  The symbol will be unchanged if the
  3876.  low and high prices are interchanged or if the opening and closing prices
  3877.  are interchanged.  See `set bar` and `financebars`.
  3878. ?set style dots
  3879. ?style dots
  3880. ?dots
  3881.  The `dots` style plots a tiny dot at each point; this is useful for scatter
  3882.  plots with many points.
  3883. ?set style financebars
  3884. ?style financebars
  3885. ?financebars
  3886.  The `financebars` style is only relevant for 2-d data plotting of financial
  3887.  data.  Five columns of data are required; in order, these should be the x
  3888.  coordinate (most likely a date) and the opening, low, high, and closing
  3889.  prices.  The symbol is a vertical line segment, located horizontally at the x
  3890.  coordinate and limited vertically by the high and low prices.  A horizontal
  3891.  tic on the left marks the opening price and one on the right marks the
  3892.  closing price.  The length of these tics may be changed by `set bar`.  The
  3893.  symbol will be unchanged if the high and low prices are interchanged.  See
  3894.  `set bar` and `candlesticks`.
  3895. ?set style fsteps
  3896. ?style fsteps
  3897. ?fsteps
  3898.  The `fsteps` style is only relevant to 2-d plotting.  It connects consecutive
  3899.  points with two line segments: the first from (x1,y1) to (x1,y2) and the
  3900.  second from (x1,y2) to (x2,y2).
  3901. ?set style histeps
  3902. ?style histeps
  3903. ?histeps
  3904.  The `histeps` style is only relevant to 2-d plotting.  It is intended for
  3905.  plotting histograms.  Y-values are assumed to be centered at the x-values;
  3906.  the point at x1 is represented as a horizontal line from ((x0+x1)/2,y1) to
  3907.  ((x1+x2)/2,y1).  The lines representing the end points are extended so that
  3908.  the step is centered on at x.  Adjacent points are connected by a vertical
  3909.  line at their average x, that is, from ((x1+x2)/2,y1) to ((x1+x2)/2,y2).
  3910.  
  3911.  If `autoscale` is in effect, it selects the xrange from the data rather than
  3912.  the steps, so the end points will appear only half as wide as the others.
  3913.  
  3914.  `histeps` is only a plotting style; `gnuplot` does not have the ability to
  3915.  create bins and determine their population from some data set.
  3916. ?set style impulses
  3917. ?style impulses
  3918. ?impulses
  3919.  The `impulses` style displays a vertical line from the x axis (not the graph
  3920.  border), or from the grid base for `splot`, to each point.
  3921. ?set style lines
  3922. ?style lines
  3923. ?lines
  3924.  The `lines` style connects adjacent points with straight line segments.
  3925. ?set style linespoints
  3926. ?set style lp
  3927. ?style linespoints
  3928. ?style lp
  3929. ?linespoints
  3930. ?lp
  3931.  The `linespoints` style does both `lines` and `points`, that is, it draws a
  3932.  small symbol at each point and then connects adjacent points with straight
  3933.  line segments.  The command `set pointsize` may be used to change the size of
  3934.  the points.  See `set pointsize` for its usage.
  3935.  
  3936.  `linespoints` may be abbreviated `lp`.
  3937. ?set style points
  3938. ?style points
  3939. ?points
  3940.  The `points` style displays a small symbol at each point.  The command `set
  3941.  pointsize` may be used to change the size of the points.  See `set pointsize`
  3942.  for its usage.
  3943. ?set style steps
  3944. ?style steps
  3945. ?steps
  3946.  The `steps` style is only relevant to 2-d plotting.  It connects consecutive
  3947.  points with two line segments: the first from (x1,y1) to (x2,y1) and the
  3948.  second from (x2,y1) to (x2,y2).
  3949. ?set style vector
  3950. ?style vector
  3951. ?vector
  3952.  The `vector` style draws a vector from (x,y) to (x+xdelta,y+ydelta).  Thus
  3953.  it requires four columns of data.  It also draws a small arrowhead at the
  3954.  end of the vector.
  3955.  
  3956.  The `vector` style is still experimental: it doesn't get clipped properly
  3957.  and other things may also be wrong with it.  Use it at your own risk.
  3958. ?set style xerrorbars
  3959. ?style xerrorbars
  3960. ?xerrorbars
  3961.  The `xerrorbars` style is only relevant to 2-d data plots.  `xerrorbars` is
  3962.  like `dots`, except that a horizontal error bar is also drawn.  At each point
  3963.  (x,y), a line is drawn from (xlow,y) to (xhigh,y) or from (x-xdelta,y) to
  3964.  (x+xdelta,y), depending on how many data columns are provided.  A tic mark
  3965.  is placed at the ends of the error bar (unless `set bar` is used---see `set
  3966.  bar` for details).
  3967. ?set style xyerrorbars
  3968. ?style xyerrorbars
  3969. ?xyerrorbars
  3970.  The `xyerrorbars` style is only relevant to 2-d data plots.  `xyerrorbars` is
  3971.  like `dots`, except that horizontal and vertical error bars are also drawn.
  3972.  At each point (x,y), lines are drawn from (x,y-ydelta) to (x,y+ydelta) and
  3973.  from (x-xdelta,y) to (x+xdelta,y) or from (x,ylow) to (x,yhigh) and from
  3974.  (xlow,y) to (xhigh,y), depending upon the number of data columns provided.  A
  3975.  tic mark is placed at the ends of the error bar (unless `set bar` is
  3976.  used---see `set bar` for details).
  3977.  
  3978.  If data are provided in an unsupported mixed form, the `using` filter on the
  3979.  `plot` command should be used to set up the appropriate form.  For example,
  3980.  if the data are of the form (x,y,xdelta,ylow,yhigh), then you can use
  3981.  
  3982.        plot 'data' using 1:2:($1-$3),($1+$3),4,5 with xyerrorbars
  3983. ?set style yerrorbars
  3984. ?style yerrorbars
  3985. ?yerrorbars
  3986. ?set style errorbars
  3987. ?style errorbars
  3988. ?errorbars
  3989.  The `yerrorbars` (or `errorbars`) style is only relevant to 2-d data plots.
  3990.  `yerrorbars` is like `dots`, except that a vertical error bar is also drawn.
  3991.  At each point (x,y), a line is drawn from (x,y-ydelta) to (x,y+ydelta) or
  3992.  from (x,ylow) to (x,yhigh), depending on how many data columns are provided.
  3993.  A tic mark is placed at the ends of the error bar (unless `set bar` is
  3994.  used---see `set bar` for details).
  3995. ?set surface
  3996. ?set nosurface
  3997. ?show surface
  3998. ?surface
  3999. ?nosurface
  4000.  The command `set surface` controls the display of surfaces, which are drawn
  4001.  as a mesh of isolines.
  4002.  
  4003.  Syntax:
  4004.        set surface
  4005.        set nosurface
  4006.        show surface
  4007.  
  4008.  Whenever `set nosurface` is issued, no surface isolines/mesh will be drawn.
  4009.  This is useful if contours are to be displayed by themselves.  See also `set
  4010.  contour`.
  4011. ?set terminal
  4012. ?set term
  4013. ?show terminal
  4014. ?terminal
  4015. ?term
  4016.  `gnuplot` supports many different graphics devices.  Use `set terminal` to
  4017.  tell `gnuplot` what kind of output to generate.
  4018.  
  4019.  Syntax:
  4020.        set terminal {<terminal-type>}
  4021.        show terminal
  4022.  
  4023.  If <terminal-type> is omitted, `gnuplot` will list the available terminal
  4024.  types.  <terminal-type> may be abbreviated.
  4025.  
  4026.  Use `set output` to redirect this output to a file or device.
  4027.  
  4028.  If both `set terminal` and `set output` are used together, it is safest to
  4029.  give `set terminal` first, because some terminals set a flag which is needed
  4030.  in some operating systems.
  4031.  
  4032.  Several terminals have additional options.  For example, see `dumb`,
  4033.  `iris4d`, `hpljii` or `postscript`.
  4034.  
  4035.  This document may describe drivers that are not available to you because they
  4036.  were not installed, or it may not describe all the drivers that are available
  4037.  to you, depending on its output format.
  4038. ?set terminal aed767
  4039. ?set term aed767
  4040. ?terminal aed767
  4041. ?term aed767
  4042. ?aed767
  4043. ?set terminal aed512
  4044. ?set term aed512
  4045. ?terminal aed512
  4046. ?term aed512
  4047. ?aed512
  4048.  The `aed512` and `aed767` terminal drivers support AED graphics terminals.
  4049.  The two drivers differ only in their horizontal ranges, which are 512 and
  4050.  768 pixels, respectively.  Their vertical range is 575 pixels.  There are
  4051.  no options for these drivers.
  4052. ?set terminal gpic
  4053. ?set term gpic
  4054. ?terminal gpic
  4055. ?term gpic
  4056. ?gpic
  4057.  The `gpic` terminal driver generates GPIC graphs in the Free Software
  4058.  Foundations's "groff" package.  The default size is 5 x 3 inches.  The only
  4059.  option is the origin, which defaults to (0,0).
  4060.  
  4061.  Syntax:
  4062.        set terminal gpic {<x> <y>}
  4063.  
  4064.  where `x` and `y` are in inches.
  4065.  
  4066.  A simple graph can be formatted using
  4067.  
  4068.        groff -p -mpic -Tps file.pic > file.ps.
  4069.  
  4070.  The output from pic can be pipe-lined into eqn, so it is possible to put
  4071.  complex functions in a graph with the `set label` and `set {x/y}label`
  4072.  commands.  For instance,
  4073.  
  4074.        set ylab '@space 0 int from 0 to x alpha ( t ) roman d t@'
  4075.  
  4076.  will label the y axis with a nice integral if formatted with the command:
  4077.  
  4078.        gpic filename.pic | geqn -d@@ -Tps | groff -m[macro-package] -Tps
  4079.            > filename.ps
  4080.  
  4081.  Figures made this way can be scaled to fit into a document.  The pic language
  4082.  is easy to understand, so the graphs can be edited by hand if need be.  All
  4083.  co-ordinates in the pic-file produced by `gnuplot` are given as x+gnuplotx
  4084.  and y+gnuploty.  By default x and y are given the value 0.  If this line is
  4085.  removed with an editor in a number of files, one can put several graphs in
  4086.  one figure like this (default size is 5.0x3.0 inches):
  4087.  
  4088.        .PS 8.0
  4089.        x=0;y=3
  4090.        copy "figa.pic"
  4091.        x=5;y=3
  4092.        copy "figb.pic"
  4093.        x=0;y=0
  4094.        copy "figc.pic"
  4095.        x=5;y=0
  4096.        copy "figd.pic"
  4097.        .PE
  4098.  
  4099.  This will produce an 8-inch-wide figure with four graphs in two rows on top
  4100.  of each other.
  4101.  
  4102.  One can also achieve the same thing by the command
  4103.  
  4104.        set terminal gpic x y
  4105.  
  4106.  for example, using
  4107.  
  4108.        .PS 6.0
  4109.        copy "trig.pic"
  4110.        .PE
  4111. ?set terminal regis
  4112. ?set term regis
  4113. ?terminal regis
  4114. ?term regis
  4115. ?regis
  4116.  The `regis` terminal device generates output in the REGIS graphics language.
  4117.  It has the option of using 4 (the default) or 16 colors.
  4118.  
  4119.  Syntax:
  4120.        set terminal regis {4 | 16}
  4121. ?set terminal tek410x
  4122. ?set term tek410x
  4123. ?terminal tek410x
  4124. ?term tek410x
  4125. ?tek410x
  4126.  The `tek410x` terminal driver supports the 410x and 420x family of Tektronix
  4127.  terminals.  It has no options.
  4128. ?set terminal tek40xx
  4129. ?set term tek40xx
  4130. ?terminal tek40xx
  4131. ?terminal tek40xx
  4132. ?tek40
  4133. ?set terminal vttek
  4134. ?set term vttek
  4135. ?terminal vttek
  4136. ?term vttek
  4137. ?vttek
  4138. ?set terminal kc-tek40xx
  4139. ?set term kc-tek40xx
  4140. ?terminal kc-tek40xx
  4141. ?term kc-tek40xx
  4142. ?kc-tek40xx
  4143. ?set terminal km-tek40xx
  4144. ?set term km-tek40xx
  4145. ?terminal km-tek40xx
  4146. ?term km-tek40xx
  4147. ?km-tek40xx
  4148. ?set terminal selanar
  4149. ?set term selanar
  4150. ?terminal selanar
  4151. ?term selanar
  4152. ?selanar
  4153. ?set terminal bitgraph
  4154. ?set term bitgraph
  4155. ?terminal bitgraph
  4156. ?term bitgraph
  4157. ?bitgraph
  4158.  This family of terminal drivers supports a variety of VT-like terminals.
  4159.  `tek40xx` supports Tektronix 4010 and others as well as most TEK emulators;
  4160.  `vttek` supports VT-like tek40xx terminal emulators; `kc-tek40xx` supports
  4161.  MS-DOS Kermit Tek4010 terminal emulators in color: `km-tek40xx` supports them
  4162.  in monochrome; `selanar` supports Selanar graphics; and `bitgraph` supports
  4163.  BBN Bitgraph terminals.  None have any options.
  4164. ?set terminal x11
  4165. ?set term x11
  4166. ?terminal x11
  4167. ?term x11
  4168. ?x11
  4169.  `gnuplot` provides the `x11` terminal type for use with X servers.  This
  4170.  terminal type is set automatically at startup if the `DISPLAY` environment
  4171.  variable is set, if the `TERM` environment variable is set to `xterm`, or
  4172.  if the `-display` command line option is used.
  4173.  
  4174.  Syntax:
  4175.        set terminal x11 {reset} {<n>}
  4176.  
  4177.  Multiple plot windows are supported: `set terminal x11 <n>` directs the
  4178.  output to plot window number n.  If n>0, the terminal number will be
  4179.  appended to the window title and the icon will be labeled `gplt <n>`.
  4180.  The active window may distinguished by a change in cursor (from default
  4181.  to crosshair.)
  4182.  
  4183.  Plot windows remain open even when the `gnuplot` driver is changed to a
  4184.  different device.  A plot window can be closed by pressing the letter q
  4185.  while that window has input focus, or by choosing `close` from a window
  4186.  manager menu.
  4187.  
  4188.  All plot windows can be closed by specifying `reset`, which actually
  4189.  terminates the subprocess which maintains the windows (unless -persist was
  4190.  specified).
  4191.  
  4192.  For terminal type `x11`, `gnuplot` accepts (when initialized) the standard
  4193.  X Toolkit options and resources such as geometry, font, and background from
  4194.  from the command line arguments or a configuration file.  See the X(1) man
  4195.  page (or its equivalent) for a description of the options.
  4196.  
  4197.  Many other options are available for the `x11` terminal.  These may be
  4198.  specified either as command-line options when `gnuplot` is invoked or as
  4199.  resources in the configuration file "/.Xdefaults".  Thus they are chosen
  4200.  at start-up time and cannot be altered during a single `gnuplot` session.
  4201. ?set terminal x11 command-line-options
  4202. ?set term x11 command-line-options
  4203. ?x11 command-line-options
  4204. ?command-line-options
  4205.  In addition to the X Toolkit options, the following options may be specified
  4206.  on the command line when starting `gnuplot` or as resources in your
  4207.  ".Xdefaults" file:
  4208.   `-mono`    forces monochrome rendering on color displays.
  4209.   `-gray`    requests grayscale rendering on grayscale or color displays.
  4210.              (Grayscale displays receive monochrome rendering by default.)
  4211.   `-clear`   requests that the window be cleared momentarily before a
  4212.              new plot is displayed.
  4213.   `-tvtwm`   requests that geometry specifications for position of the
  4214.              window be made relative to the currently displayed portion
  4215.              of the virtual root.
  4216.   `-raise`   raise plot window after each plot
  4217.   `-noraise` do not raise plot window after each plot
  4218.   `-persist` plot windows survive after main gnuplot program exits
  4219.  The options are shown above in their command-line syntax.  When entered as
  4220.  resources in ".Xdefaults", they require a different syntax.
  4221.  
  4222.  Example:
  4223.        gnuplot*gray: on
  4224.  
  4225.  `gnuplot` provides a command line option (`-pointsize v`) and a resource
  4226.  (`gnuplot*pointsize: v`) to control the size of points plotted with the
  4227.  `points` plotting style.  The value `v` is a real number (greater than 0 and
  4228.  less than or equal to ten) used as a scaling factor for point sizes.  For
  4229.  example, `-pointsize 2` uses points twice the default size, and `-pointsize`
  4230.  `0.5` uses points half the normal size.
  4231.  
  4232.  Plot windows will automatically be closed at the end of the session
  4233.  unless the `-persist` option was given.
  4234.  
  4235.  For monochrome displays, `gnuplot` does not honor foreground or background
  4236.  colors.  The default is black-on-white.  `-rv` or `gnuplot*reverseVideo: on`
  4237.  requests white-on-black.
  4238.  
  4239.  For color displays, `gnuplot` honors the following resources (shown here with
  4240.  their default values).  The values may be color names as listed in the X11
  4241.  rgb.txt file on your system, hexadecimal RGB color specifications (see X11
  4242.  documentation), or a color name followed by a comma and an `intensity` value
  4243.  from 0 to 1.  For example, `blue,.5` means a half intensity blue.
  4244.   gnuplot*background: white
  4245.   gnuplot*textColor: black
  4246.   gnuplot*borderColor: black
  4247.   gnuplot*axisColor: black
  4248.   gnuplot*line1Color: red
  4249.   gnuplot*line2Color: green
  4250.   gnuplot*line3Color: blue
  4251.   gnuplot*line4Color: magenta
  4252.   gnuplot*line5Color: cyan
  4253.   gnuplot*line6Color: sienna
  4254.   gnuplot*line7Color: orange
  4255.   gnuplot*line8Color: coral
  4256.  
  4257.  The command-line syntax for these is, for example,
  4258.  
  4259.  Example:
  4260.        gnuplot -background coral
  4261.  
  4262.  When `-gray` is selected, `gnuplot` honors the following resources for
  4263.  grayscale or color displays (shown here with their default values).  Note
  4264.  that the default background is black.
  4265.   gnuplot*background: black
  4266.   gnuplot*textGray: white
  4267.   gnuplot*borderGray: gray50
  4268.   gnuplot*axisGray: gray50
  4269.   gnuplot*line1Gray: gray100
  4270.   gnuplot*line2Gray: gray60
  4271.   gnuplot*line3Gray: gray80
  4272.   gnuplot*line4Gray: gray40
  4273.   gnuplot*line5Gray: gray90
  4274.   gnuplot*line6Gray: gray50
  4275.   gnuplot*line7Gray: gray70
  4276.   gnuplot*line8Gray: gray30
  4277.  
  4278.  `gnuplot` honors the following resources for setting the width (in pixels) of
  4279.  plot lines (shown here with their default values.)  0 or 1 means a minimal
  4280.  width line of 1 pixel width.  A value of 2 or 3 may improve the appearance of
  4281.  some plots.
  4282.   gnuplot*borderWidth: 2
  4283.   gnuplot*axisWidth: 0
  4284.   gnuplot*line1Width: 0
  4285.   gnuplot*line2Width: 0
  4286.   gnuplot*line3Width: 0
  4287.   gnuplot*line4Width: 0
  4288.   gnuplot*line5Width: 0
  4289.   gnuplot*line6Width: 0
  4290.   gnuplot*line7Width: 0
  4291.   gnuplot*line8Width: 0
  4292.  
  4293.  `gnuplot` honors the following resources for setting the dash style used for
  4294.  plotting lines.  0 means a solid line.  A two-digit number `jk` (`j` and `k`
  4295.  are >= 1  and <= 9) means a dashed line with a repeated pattern of `j` pixels
  4296.  on followed by `k` pixels off.  For example, '16' is a "dotted" line with one
  4297.  pixel on followed by six pixels off.  More elaborate on/off patterns can be
  4298.  specified with a four-digit value.  For example, '4441' is four on, four off,
  4299.  four on, one off.  The default values shown below are for monochrome displays
  4300.  or monochrome rendering on color or grayscale displays.  For color displays,
  4301.  the default for each is 0 (solid line) except for `axisDashes` which defaults
  4302.  to a '16' dotted line.
  4303.   gnuplot*borderDashes: 0
  4304.   gnuplot*axisDashes: 16
  4305.   gnuplot*line1Dashes: 0
  4306.   gnuplot*line2Dashes: 42
  4307.   gnuplot*line3Dashes: 13
  4308.   gnuplot*line4Dashes: 44
  4309.   gnuplot*line5Dashes: 15
  4310.   gnuplot*line6Dashes: 4441
  4311.   gnuplot*line7Dashes: 42
  4312.   gnuplot*line8Dashes: 13
  4313.  
  4314.  The size or aspect ratio of a plot may be changed by resizing the `gnuplot`
  4315.  window.
  4316. ?set terminal xlib
  4317. ?set term xlib
  4318. ?terminal xlib
  4319. ?term xlib
  4320. ?xlib
  4321.  The `xlib` terminal driver supports the X11 Windows System.  It generates
  4322.  gnulib_x11 commands.  `set term x11` behaves similarly to `set terminal xlib;
  4323.  set output "|gnuplot_x11"`.  `xlib` has no options, but see `x11`.
  4324. ?set terminal aifm
  4325. ?set term aifm
  4326. ?terminal aifm
  4327. ?term aifm
  4328. ?aifm
  4329.  Several options may be set in `aifm`---the Adobe Illustrator 3.0+ driver.
  4330.  
  4331.  Syntax:
  4332.        set terminal aifm {<color>} {"<fontname>"} {<fontsize>}
  4333.  
  4334.  <color> is either `color` or `monochrome`; "<fontname>" is the name of a
  4335.  valid PostScript font; <fontsize> is the size of the font in PostScript
  4336.  points, before scaling by the `set size` command.  Selecting `default` sets
  4337.  all options to their default values: `monochrome`, "Helvetica", and 14pt.
  4338.  
  4339.  Since AI does not really support multiple pages, multiple graphs will be
  4340.  drawn directly on top of one another.  However, each graph will be grouped
  4341.  individually, making it easy to separate them inside AI (just pick them up
  4342.  and move them).
  4343.  
  4344.  Examples:
  4345.        set term aifm
  4346.        set term aifm 22
  4347.        set size 0.7,1.4; set term aifm color "Times-Roman" 14
  4348. ?set terminal cgm
  4349. ?set term cgm
  4350. ?terminal cgm
  4351. ?term cgm
  4352. ?cgm
  4353.  The `cgm` terminal generates a Computer Graphics Metafile.  This file format
  4354.  is a subset of the ANSI X3.122-1986 standard entitled "Computer Graphics -
  4355.  Metafile for the Storage and Transfer of Picture Description Information".
  4356.  Several options may be set in `cgm`.
  4357.  
  4358.  Syntax:
  4359.        set terminal cgm {<mode>} {<color>} {<rotation>}
  4360.                         {width <plot_width>} {linewidth <line_width>}
  4361.                         {"<font>"} {<fontsize>}
  4362.  
  4363.  where <mode> is `landscape`, `portrait`, or `default`;
  4364.  <color> is either `color` or `monochrome`; 
  4365.  <rotation> is either `rotate` or `norotate`;
  4366.  <plot_width> is the width of the page in points; 
  4367.  <line_width> is the line width in points; 
  4368.  <font> is the name of a font; and 
  4369.  `<fontsize>` is the size of the font in points.
  4370.  
  4371.  By default, `cgm` uses rotated text for the Y axis label.
  4372.  
  4373.  The first five options can be in any order.  Selecting `default` sets all
  4374.  options to their default values.
  4375.  
  4376.  Examples:
  4377.        set terminal cgm landscape color rotate width 432 linewidth 1 \
  4378.                       'Arial Bold' 12                  # defaults
  4379.        set terminal cgm 14 linewidth 2  14  # wider lines & larger font
  4380.        set terminal cgm portrait 'Times Roman Italic' 12
  4381. ?set terminal cgm font
  4382. ?set term cgm font
  4383. ?cgm font
  4384.  The first part of a Computer Graphics Metafile, the metafile description,
  4385.  includes a font table.  In the picture body, a font is designated by an
  4386.  index into this table.  By default, this terminal generates a table with
  4387.  the following fonts:
  4388.        Arial
  4389.        Arial Italic
  4390.        Arial Bold
  4391.        Arial Bold Italic
  4392.        Times Roman
  4393.        Times Roman Italic
  4394.        Times Roman Bold
  4395.        Times Roman Bold Italic
  4396.        Helvetica
  4397.        Roman
  4398.  Case is not distinct, but the modifiers must appear in the above order (that
  4399.  is, not 'Arial Italic Bold').  'Arial Bold' is the default font.
  4400.  
  4401.  You may also specify a font name which does not appear in the default font
  4402.  table.  In that case, a new font table is constructed with the specified
  4403.  font as its only entry.  You must ensure that the spelling, capitalization,
  4404.  and spacing of the name are appropriate for the application that will read
  4405.  the CGM file.
  4406. ?set terminal cgm fontsize
  4407. ?set term cgm fontsize
  4408. ?cgm fontsize
  4409.  Fonts are scaled assuming the page is 6 inches wide.  If the `size` command
  4410.  is used to change the aspect ratio of the page or the CGM file is converted
  4411.  to a different width (e.g. it is imported into a document in which the
  4412.  margins are not 6 inches apart), the resulting font sizes will be different.
  4413.  To change the assumed width, use the `width` option.
  4414. ?set terminal cgm linewidth
  4415. ?set term cgm linewidth
  4416. ?cgm linewidth
  4417.  The `linewidth` option sets the width of lines in pt.  The default width is
  4418.  1 pt.  Scaling is affected by the actual width of the page, as discussed
  4419.  under the `fontsize` and `width` options
  4420. ?set terminal cgm rotate
  4421. ?set term cgm rotate
  4422. ?cgm rotate
  4423.  The `norotate` option may be used to disable text rotation.  For example,
  4424.  the CGM input filter for Word for Windows 6.0c can accept rotated text, but
  4425.  the DRAW editor within Word cannot.  If you edit a graph (for example, to
  4426.  label a curve), all rotated text is restored to horizontal.  The Y axis
  4427.  label will then extend beyond the clip boundary.  With `norotate`, the Y
  4428.  axis label starts in a less attractive location, but the page can be edited
  4429.  without damage.  The `rotate` option confirms the default behavior.
  4430. ?set terminal cgm size
  4431. ?set term cgm size
  4432. ?scgm size
  4433.  Default size of a CGM page is 32599 units wide and 23457 units high for
  4434.  landscape, or 23457 units wide by 32599 units high for portrait.
  4435. ?set terminal cgm width
  4436. ?set term cgm width
  4437. ?cgm width
  4438.  All distances in the CGM file are in abstract units.  The application that
  4439.  reads the file determines the size of the final page.  By default, the width
  4440.  of the final page is assumed to be 6 inches (15.24 cm).  This distance is
  4441.  used to calculate the correct font size, and may be changed with the `width`
  4442.  option.  The keyword should be followed by the width in points.  (Here, a
  4443.  point is 1/72 inch, as in PostScript.  This unit is known as a "big point"
  4444.  in TeX.)  `gnuplot` arithmetic can be used to convert from other units, as
  4445.  follows:
  4446.        set terminal cgm width 432            # default
  4447.        set terminal cgm width 6*72           # same as above
  4448.        set terminal cgm width 10/2.54*72     # 10 cm wide
  4449. ?set terminal cgm winword6
  4450. ?set term cgm winword6
  4451. ?cgm winword6
  4452.  The default font table was chosen to match, where possible, the default font
  4453.  assignments made by the Computer Graphics Metafile input filter for
  4454.  Microsoft Word 6.0c, although the filter makes available only 'Arial' and
  4455.  'Times Roman' fonts and their bold and/or italic variants.  Other fonts such
  4456.  as 'Helvetica' and 'Roman' are not available.  If the CGM file includes a
  4457.  font table, the filter mostly ignores it.  However, it changes certain font
  4458.  assignments so that they disagree with the table.  As a workaround, the
  4459.  `winword6` option deletes the font table from the CGM file.  In this case,
  4460.  the filter makes predictable font assignments.  'Arial Bold' is correctly
  4461.  assigned even with the font table present, which is one reason it was chosen
  4462.  as the default.
  4463.  
  4464.  `winword6` disables the color tables for a similar reason---with the color
  4465.  table included, Microsoft Word displays black for color 7.
  4466. ?set terminal corel
  4467. ?set term corel
  4468. ?terminal corel
  4469. ?term corel
  4470. ?corel
  4471.  The `corel` terminal driver supports CorelDraw.
  4472.  
  4473.  Syntax:       set terminal corel {  default
  4474.                            | {monochrome | color
  4475.                                 {<fontname> {"<fontsize>" 
  4476.                                    {<xsize> <ysize> {<linewidth> }}}}}
  4477.  
  4478.  where the fontsize and linewidth are specified in points and the sizes in
  4479.  inches.  The defaults are monochrome, "SwitzerlandLight", 22, 8.2, 10 and 1.2.
  4480. ?set terminal dumb
  4481. ?set term dumb
  4482. ?terminal dumb
  4483. ?term dumb
  4484. ?dumb
  4485.  The `dumb` terminal driver has an optional size specification and trailing
  4486.  linefeed control.
  4487.  
  4488.  Syntax:
  4489.        set terminal dumb {[no]feed} {<xsize> <ysize>}
  4490.  
  4491.  where <xsize> and <ysize> set the size of the dumb terminals. Default is
  4492.  79 by 24. The last newline is printed only if `feed` is enabled.
  4493.  
  4494.  Examples:
  4495.        set term dumb nofeed
  4496.        set term dumb 79 49 # VGA screen---why would anyone do that?
  4497. ?set terminal dxf
  4498. ?set term dxf
  4499. ?terminal dxf
  4500. ?term dxf
  4501. ?dxf
  4502.  The `dxf` terminal driver creates pictures that can be imported into AutoCad
  4503.  (Release 10.x).  It has no options of its own, but some features of its plots
  4504.  may be modified by other means.  The default size is 120x80 AutoCad units,
  4505.  which can be changed by `set size`.  `dxf` uses seven colors (white, red,
  4506.  yellow, green, cyan, blue and magenta), which can be changed only by
  4507.  modifying the source file.  If a black-and-white plotting device is used, the
  4508.  colors are mapped to differing line thicknesses.  See the description of the
  4509.  AutoCad print/plot command.
  4510. ?set terminal dxy800a
  4511. ?set term dxy800a
  4512. ?terminal dxy800a
  4513. ?term dxy800a
  4514. ?dxy800a
  4515.  This terminal driver supports the Roland DXY800A plotter.  It has no options.
  4516. ?set terminal excl
  4517. ?set term excl
  4518. ?terminal excl
  4519. ?term excl
  4520. ?excl
  4521.  The `excl` terminal driver supports Talaris printers such as the EXCL Laser
  4522.  printer and the 1590.  It has no options.
  4523. ?set terminal fig
  4524. ?set term fig
  4525. ?terminal fig
  4526. ?term fig
  4527. ?fig
  4528.  The `fig` terminal device generates output in the Fig graphics language.
  4529.  
  4530.  Syntax:
  4531.        set terminal fig {monochrome | color} {small | big}
  4532.                         {pointsmax <max_points>}
  4533.                         {landscape | portrait}
  4534.                         {metric | inches}
  4535.                         {fontsize <fsize>}
  4536.                         {size <xsize> <ysize>}
  4537.                         {thickness <units>}
  4538.                         {depth <layer>}
  4539.  
  4540.  `monochrome` and `color` determine whether the picture is black-and-white or
  4541.  `color`.  `small` and `big` produce a 5x3 or 8x5 inch graph in the default
  4542.  `landscape` mode and 3x5 or 5x8 inches in `portrait` mode.  <max_points>
  4543.  sets the maximum number of points per polyline.  Default units for editing
  4544.  with "xfig" may be `metric` or `inches`.  `fontsize` sets the size of the
  4545.  text font to <fsize> points.  `size` sets (overrides) the size of the drawing
  4546.  area to <xsize>*<ysize> in units of inches or centimeters depending on the
  4547.  `inches` or `metric` setting in effect.  `depth` sets the default depth layer
  4548.  for all lines and text.  The default depth is 10 to leave room for adding
  4549.  material with "xfig" on top of the plot.
  4550.  
  4551.  `thickness` sets the default line thickness, which is 1 if not specified.
  4552.  Overriding the thickness can be achieved by adding a multiple of 100 to the
  4553.  to the `linetype` value for a `plot` command.  In a similar way the `depth`
  4554.  of plot elements (with respect to the default depth) can be controlled by
  4555.  adding a multiple of 1000 to <linetype>.  The depth is then <layer> +
  4556.  <linetype>/1000 and the thickness is (<linetype>%1000)/100 or, if that is
  4557.  zero, the default line thickness.
  4558.  Additional point-plot symbols are also available with the `fig` driver. The
  4559.  symbols can be used through `pointtype` values % 100 above 50, with different
  4560.  fill intensities controlled by <pointtype> % 5 and outlines in black (for
  4561.  <pointtype> % 10 < 5) or in the current color.  Available symbols are
  4562.          50 - 59:  circles
  4563.          60 - 69:  squares
  4564.          70 - 79:  diamonds
  4565.          80 - 89:  upwards triangles
  4566.          90 - 99:  downwards triangles
  4567.  The size of these symbols is linked to the font size.  The depth of symbols
  4568.  is by default one less than the depth for lines to achieve nice error bars.
  4569.  If <pointtype> is above 1000, the depth is <layer> + <pointtype>/1000-1.  If
  4570.  <pointtype>%1000 is above 100, the fill color is (<pointtype>%1000)/100-1.
  4571.  
  4572.  Available fill colors are (from 1 to 9): black, blue, green, cyan, red,
  4573.  magenta, yellow, white and dark blue (in monochrome mode: black for 1 to 6
  4574.  and white for 7 to 9).
  4575.  
  4576.  See `plot with` for details of <linetype> and <pointtype>.
  4577.  
  4578.  The `big` option is a substitute for the `bfig` terminal in earlier versions,
  4579.  which is no longer supported.
  4580.  
  4581.  Examples:
  4582.        set terminal fig monochrome small pointsmax 1000  # defaults
  4583.  
  4584.        plot 'file.dat' with points linetype 102 pointtype 759
  4585.  would produce circles with a blue outline of width 1 and yellow fill color.
  4586.  
  4587.        plot 'file.dat' using 1:2:3 with err linetype 1 pointtype 554
  4588.  would produce errorbars with black lines and circles filled red.  These
  4589.  circles are one layer above the lines (at depth 9 by default).
  4590.  
  4591.  To plot the error bars on top of the circles use
  4592.        plot 'file.dat' using 1:2:3 with err linetype 1 pointtype 2554
  4593. ?set terminal hp2623a
  4594. ?set term hp2623a
  4595. ?terminal hp2623a
  4596. ?term hp2623a
  4597. ?hp2623a
  4598.  The `hp2623a` terminal driver supports the Hewlett Packard HP2623A.  It has
  4599.  no options.
  4600. ?set terminal hp2648
  4601. ?set term hp2648
  4602. ?terminal hp2648
  4603. ?term hp2648
  4604. ?hp2648
  4605.  The `hp2648` terminal driver supports the Hewlett Packard HP2647 and HP2648.
  4606.  It has no options.
  4607. ?set terminal hp500c
  4608. ?set term hp500c
  4609. ?terminal hp500c
  4610. ?term hp500c
  4611. ?hp500c
  4612.  The `hp500c` terminal driver supports the Hewlett Packard HP DeskJet 500c.
  4613.  It has options for resolution and compression.
  4614.  
  4615.  Syntax:
  4616.        set terminal hp500c {<res>} {<comp>}
  4617.  
  4618.  where `res` can be 75, 100, 150 or 300 dots per inch and `comp` can be "rle",
  4619.  or "tiff".  Any other inputs are replaced by the defaults, which are 75 dpi
  4620.  and no compression.  Rasterization at the higher resolutions may require a
  4621.  large amount of memory.
  4622. ?set terminal hpgl
  4623. ?set term hpgl
  4624. ?terminal hpgl
  4625. ?term hpgl
  4626. ?hpgl
  4627. ?set terminal pcl5
  4628. ?set term pcl5
  4629. ?terminal pcl5
  4630. ?term pcl5
  4631. ?pcl5
  4632.  The `hpgl` driver produces HPGL output for devices like the HP7475A plotter.
  4633.  There are two options which can be set---the number of pens and "eject", which
  4634.  tells the plotter to eject a page when done.  The default is to use 6 pens
  4635.  and not to eject the page when done.
  4636.  
  4637.  The international character sets ISO-8859-1 and CP850 are recognized via
  4638.  `set encoding iso_8859_1` or `set encoding cp850` (see `set encoding` for
  4639.  details).
  4640.  
  4641.  Syntax:
  4642.        set terminal hpgl {<number_of_pens>} {eject}
  4643.  
  4644.  The selection
  4645.  
  4646.        set terminal hpgl 8 eject
  4647.  
  4648.  is equivalent to the previous `hp7550` terminal, and the selection
  4649.  
  4650.        set terminal hpgl 4
  4651.  
  4652.  is equivalent to the previous `hp7580b` terminal.
  4653.  
  4654.  The `pcl5` driver supports the Hewlett-Packard Laserjet III.  It actually uses
  4655.  HPGL-2, but there is a name conflict among the terminal devices.  It has
  4656.  several options
  4657.  
  4658.  Syntax:
  4659.        set terminal pcl5 {<mode>} {<font>} {<fontsize>}
  4660.  
  4661.  where <mode> is `landscape`, or `portrait`, <font> is `stick`, `univers`, or
  4662.  `cg_times`, and <fontsize> is the size in points.
  4663.  
  4664.  With `pcl5` international characters are handled by the printer; you just put
  4665.  the appropriate 8-bit character codes into the text strings.  You don't need
  4666.  to bother with `set encoding`.
  4667.  
  4668.  HPGL graphics can be imported by many software packages.
  4669. ?set terminal hpljii
  4670. ?set term hpljii
  4671. ?terminal hpljii
  4672. ?term hpljii
  4673. ?hpljii
  4674. ?set terminal hpdj
  4675. ?set term hpdj
  4676. ?terminal hpdj
  4677. ?term hpdj
  4678. ?hpdj
  4679.  The `hpljii` terminal driver supports the HP Laserjet Series II printer.  The
  4680.  `hpdj` driver supports the HP DeskJet 500 printer.  These drivers allow a
  4681.  choice of resolutions.
  4682.  
  4683.  Syntax:
  4684.        set terminal hpljii | hpdj {<res>}
  4685.  
  4686.  where `res` may be 75, 100, 150 or 300 dots per inch; the default is 75.
  4687.  Rasterization at the higher resolutions may require a large amount of memory.
  4688.  
  4689.  The `hp500c` terminal is similar to `hpdj`; `hp500c` additionally supports
  4690.  color and compression.
  4691. ?set terminal hppj
  4692. ?set term hppj
  4693. ?terminal hppj
  4694. ?term hppj
  4695. ?hppj
  4696.  The `hppj` terminal driver supports the HP PaintJet and HP3630 printers.  The
  4697.  only option is the choice of font.
  4698.  
  4699.  Syntax:
  4700.        set terminal hppj {FNT5X9 | FNT9X17 | FNT13X25}
  4701.  
  4702.  with the middle-sized font (FNT9X17) being the default.
  4703. ?set terminal imagen
  4704. ?set term imagen
  4705. ?terminal imagen
  4706. ?term imagen
  4707. ?imagen
  4708.  The `imagen` terminal driver supports Imagen laser printers.  It is capable
  4709.  of placing multiple graphs on a single page.
  4710.  
  4711.  Syntax:
  4712.        set terminal imagen {<fontsize>} {portrait | landscape}
  4713.                            {[<horiz>,<vert>]}
  4714.  
  4715.  where `fontsize` defaults to 12 points and the layout defaults to `landscape`.
  4716.  `<horiz>` and `<vert>` are the number of graphs in the horizontal and
  4717.  vertical directions; these default to unity.
  4718.  
  4719.  Example:
  4720.        set terminal imagen portrait [2,3]
  4721.  
  4722.  puts six graphs on the page in three rows of two in portrait orientation.
  4723. ?set terminal kyo
  4724. ?set term kyo
  4725. ?terminal kyo
  4726. ?term kyo
  4727. ?kyo
  4728. ?set terminal prescribe
  4729. ?set term prescribe
  4730. ?terminal prescribe
  4731. ?term prescribe
  4732. ?prescribe
  4733.  The `kyo` and `prescribe` terminal drivers support the Kyocera laser printer.
  4734.  The only difference between the two is that `kyo` uses "Helvetica" whereas
  4735.  `prescribe` uses "Courier".  There are no options.
  4736. ?set terminal mif
  4737. ?set term mif
  4738. ?terminal mif
  4739. ?term mif
  4740. ?mif
  4741.  The `mif` terminal driver produces Frame Maker MIF format version 3.00.  It
  4742.  plots in MIF Frames with the size 15*10 cm, and plot primitives with the same
  4743.  pen will be grouped in the same MIF group.  Plot primitives in a `gnuplot`
  4744.  page will be plotted in a MIF Frame, and several MIF Frames are collected in
  4745.  one large MIF Frame.  The MIF font used for text is "Times".
  4746.  
  4747.  Several options may be set in the MIF 3.00 driver.
  4748.  
  4749.  Syntax:
  4750.        set terminal mif {colour | monochrome} {polyline | vectors}
  4751.                         {help | ?}
  4752.  
  4753.  `colour` plots lines with line types >= 0 in colour (MIF sep. 2--7) and
  4754.  `monochrome` plots all line types in black (MIF sep. 0).
  4755.  `polyline` plots curves as continuous curves and `vectors` plots curves as
  4756.  collections of vectors.
  4757.  `help` and `?` print online help on standard error output---both print a
  4758.  short description of the usage; `help` also lists the options;
  4759.  
  4760.  Examples:
  4761.        set term mif colour polylines    # defaults
  4762.        set term mif                     # defaults
  4763.        set term mif vectors
  4764.        set term mif help
  4765. ?set terminal pbm
  4766. ?set term pbm
  4767. ?terminal pbm
  4768. ?term pbm
  4769. ?pbm
  4770.  Several options may be set in the `pbm` terminal---the driver for PBMplus.
  4771.  
  4772.  Syntax:
  4773.        set terminal pbm {<fontsize>} {<mode>}
  4774.  
  4775.  where <fontsize> is `small`, `medium`, or `large` and <mode> is `monochrome`,
  4776.  `gray` or `color`.  The default plot size is 640 pixels wide and 480 pixels
  4777.  high; this may be changed by `set size`.
  4778.  
  4779.  The output of the `pbm` driver depends upon <mode>: `monochrome` produces a
  4780.  portable bitmap (one bit per pixel), `gray` a portable graymap (three bits
  4781.  per pixel) and `color` a portable pixmap (color, four bits per pixel).
  4782.  
  4783.  The output of this driver can be used with Jef Poskanzer's excellent PBMPLUS
  4784.  package, which provides programs to convert the above PBMPLUS formats to GIF,
  4785.  TIFF, MacPaint, Macintosh PICT, PCX, X11 bitmap and many others.
  4786.  
  4787.  Examples:
  4788.        set terminal pbm small monochrome             # defaults
  4789.        set size 2,2; set terminal pbm color medium
  4790. ?set terminal png
  4791. ?set term png
  4792. ?terminal png
  4793. ?term png
  4794. ?png
  4795.  The `png` terminal driver supports Portable Network Graphics.  To compile it,
  4796.  you will need  the third-party libraries "libpng" and "zlib"; both are
  4797.  available at ftp://ftp.uu.net/graphics/png.  `png` has two options.
  4798.  
  4799.  Syntax:
  4800.        set terminal png {small | medium | large}
  4801.                         {monochrome | gray | color}
  4802.  
  4803.  The defaults are small (fontsize) and monochrome.
  4804. ?set terminal postscript
  4805. ?set term postscript
  4806. ?terminal postscript
  4807. ?term postscript
  4808. ?postscript
  4809.  Several options may be set in the `postscript` driver.
  4810.  
  4811.  Syntax:
  4812.        set terminal postscript {<mode>} {color | monochrome}
  4813.                                {solid | dashed} {<duplexing>}
  4814.                                {enhanced | noenhanced}
  4815.                                {"<fontname>"} {<fontsize>}
  4816.  
  4817.  where <mode> is `landscape`, `portrait`, `eps` or `default`
  4818.  `solid` draws all plots with solid lines, overriding any dashed patterns;
  4819.  <duplexing> is `defaultplex`, `simplex` or `duplex` ("duplexing" in
  4820.  PostScript is the ability of the printer to print on both sides of the same
  4821.  page---don't set this if your printer can't do it);
  4822.  `enhanced` activates the "Enhanced PostScript" features (subscripts,
  4823.  superscripts and mixed fonts);
  4824.  `"<fontname>"` is the name of a valid PostScript font; and `<fontsize>` is
  4825.  the size of the font in PostScript points.
  4826.  
  4827.  `default` mode sets all options to their defaults: `landscape`, `monochrome`,
  4828.  `dashed`, `defaultplex`, `noenhanced`, "Helvetica" and 14pt.
  4829.   Default size of a PostScript plot is 10 inches wide and 7 inches high.
  4830.  
  4831.  `eps` mode generates EPS (Encapsulated PostScript) output, which is just
  4832.  regular PostScript with some additional lines that allow the file to be
  4833.  imported into a variety of other applications.  (The added lines are
  4834.  PostScript comment lines, so the file may still be printed by itself.)  To
  4835.  get EPS output, use the `eps` mode and make only one plot per file.  In `eps`
  4836.  mode the whole plot, including the fonts, is reduced to half of the default
  4837.  size.
  4838.  
  4839.  Examples:
  4840.        set terminal postscript default       # old postscript
  4841.        set terminal postscript enhanced      # old enhpost
  4842.        set terminal postscript landscape 22  # old psbig
  4843.        set terminal postscript eps 14        # old epsf1
  4844.        set terminal postscript eps 22        # old epsf2
  4845.        set size 0.7,1.4; set term post portrait color "Times-Roman" 14
  4846. ?set terminal postscript enhanced
  4847. ?set term postscript enhanced
  4848. ?terminal postscript enhanced
  4849. ?term postscript enhanced
  4850. ?enhanced postscript
  4851.   Control      Examples        Explanation
  4852.    ^           a^x             superscript
  4853.    _           a_x             subscript
  4854.    @           @x or a@^b_c    phantom box (occupies no width)
  4855.    &           &{space}        inserts space of specified length
  4856.  
  4857.  {text} can be used to allow multiple-character text, where only a single
  4858.  character is expected (e.g., 2^{10}).  To change the font and/or size, use
  4859.  the full form:  {/[fontname][=fontsize] text}   (For example, {/Symbol=20 G}
  4860.  is a 20 point GAMMA).  (The '/' character MUST be the first character after
  4861.  the '{'.)
  4862.  
  4863.  If the encoding vector has been changed by `set encoding`, the default
  4864.  encoding vector can be used instead by following the slash with a dash.  This
  4865.  is unnecessary if you use the Symbol font, however---since /Symbol uses its
  4866.  own encoding vector, `gnuplot` will not apply any other encoding vector to
  4867.  it.
  4868.  
  4869.  The phantom box is useful for a@^b_c to align superscripts and subscripts,
  4870.  and for overwriting an accent on a letter.  (The latter is tricky; it is much
  4871.  easier to use `set encoding iso_8859_1` to change to the ISO Latin-1 encoding
  4872.  vector, which contains a large variety of letters with accents or other
  4873.  diacritical marks.)  It is common sense to put the shorter of the two in the
  4874.  phantom box.
  4875.  
  4876.  Space equal in length to a string can be inserted using the '&' character.
  4877.  Thus
  4878.          'abc&{def}ghi'
  4879.  would produce
  4880.          'abc   ghi'.
  4881.  
  4882.  You can access special symbols numerically by specifying \character-code (in
  4883.  octal), e.g., {/Symbol \245} is the symbol for infinity.
  4884.  
  4885.  You can escape control characters using \, e.g.,  \\, \{, and so on.
  4886.  
  4887.  But be aware that strings in double-quotes are parsed differently than those
  4888.  enclosed in single-quotes.  The major difference is that backslashes may need
  4889.  to be doubled when in double-quoted strings.
  4890.  
  4891.  Examples (these are hard to describe in words---try them!):
  4892.        set xlabel 'Time (10^6 {/Symbol m}s)'
  4893.        set title '{/Symbol=18 \362@_{/=9.6 0}^{/=12 x}} \
  4894.                   {/Helvetica e^{-{/Symbol m}^2/2} d}{/Symbol m}'
  4895.  
  4896.  The file "ps_guide.ps" in the /docs subdirectory of the `gnuplot` source
  4897.  distribution contains more examples of the enhanced syntax.
  4898. ?set terminal qms
  4899. ?set term qms
  4900. ?terminal qms
  4901. ?term qms
  4902. ?qms
  4903.  The `qms` terminal driver supports the QMS/QUIC Laser printer, the Talaris
  4904.  1200 and others.  It has no options.
  4905. ?set terminal table
  4906. ?set term table
  4907. ?terminal table
  4908. ?term table
  4909. ?table
  4910.  Instead of producing a picture, the `table` terminal prints out evaluation
  4911.  results in a multicolumn ASCII table of X Y Z values.  For those times when
  4912.  you really want to see the numbers, now you can see them on the screen or
  4913.  save to a file.  This can be useful if you want to use the contouring engine
  4914.  of `gnuplot` to work out the contours of your data and then save them for
  4915.  further use, perhaps for plotting with `plot`.  See `set contour` for an
  4916.  example.  The same trick can be used to save gridded data (`set dgrid3d`).
  4917. ?set terminal tgif
  4918. ?set term tgif
  4919. ?terminal tgif
  4920. ?term tgif
  4921. ?tgif
  4922.  Tgif is an X11-based drawing tool---it has nothing to do with GIF.
  4923.  
  4924.  The `tgif` driver supports different pointsizes (with `set pointsize`),
  4925.  different label fonts and font sizes (e.g. `set label "Hallo" at x,y font
  4926.  "Helvetica,34"`) and multiple graphs on the page.  The proportions of the
  4927.  axes are not changed.
  4928.  
  4929.  Syntax:
  4930.        set terminal tgif {portrait | landscape} {<[x,y]>}
  4931.                          {solid | dashed}
  4932.                          {"<fontname>"} {<fontsize>}
  4933.  
  4934.  where <[x,y]> specifies the number of graphs in the x and y directions on the
  4935.  page, "<fontname>" is the name of a valid PostScript font, and <fontsize>
  4936.  specifies the size of the PostScript font.  Defaults are `portrait`, `[1,1]`,
  4937.  `dashed`, `"Helvetica"`, and `18`.
  4938.  
  4939.  The `solid` option is usually prefered if lines are colored, as they often
  4940.  are in the editor.  Hardcopy will be black-and-white, so `dashed` should be
  4941.  chosen for that.
  4942.  
  4943.  Multiplot is implemented in two different ways.
  4944.  
  4945.  The first multiplot implementation is the standard gnuplot multiplot feature:
  4946.  
  4947.        set terminal tgif
  4948.        set output "file.obj"
  4949.        set multiplot
  4950.        set origin x01,y01
  4951.        set size  xs,ys
  4952.        plot ...
  4953.             ...
  4954.        set origin x02,y02
  4955.        plot ...
  4956.        set nomultiplot
  4957.  
  4958.  See `set multiplot` for further information.
  4959.  
  4960.  The second version is the [x,y] option for the driver itself.  The advantage
  4961.  of this implementation is that everything is scaled and placed automatically
  4962.  without the need for setting origins and sizes; the graphs keep their natural
  4963.  x/y proportions of 3/2 (or whatever is fixed by `set size`).
  4964.  
  4965.  If both multiplot methods are selected, the standard method is chosen and a
  4966.  warning message is given.
  4967.  
  4968.  Examples of single plots (or standard multiplot):
  4969.        set terminal tgif                  # defaults
  4970.        set terminal tgif "Times-Roman" 24
  4971.        set terminal tgif landscape
  4972.        set terminal tgif landscape solid
  4973.  
  4974.  Examples using the built-in multiplot mechanism:
  4975.        set terminal tgif portrait [2,4]  # portrait; 2 plots in the x-
  4976.                                          # and 4 in the y-direction
  4977.        set terminal tgif [1,2]           # portrait; 1 plot in the x-
  4978.                                          # and 2 in the y-direction
  4979.        set terminal tgif landscape [3,3] # landscape; 3 plots in both
  4980.                                          # directions
  4981. ?set terminal tkcanvas
  4982. ?set term tkcanvas
  4983. ?terminal tkcanvas
  4984. ?term tkcanvas
  4985. ?tkcanvas
  4986.  This terminal driver generates tk canvas widget commands.  To use it, rebuild
  4987.  `gnuplot` (after uncommenting or inserting the appropriate line in "term.h"),
  4988.  then
  4989.  
  4990.   gnuplot> set term tkcanvas
  4991.   gnuplot> set output 'plot.file'
  4992.  
  4993.  After invoking "wish", execute the following sequence of tcl commands:
  4994.  
  4995.   % source plot.file
  4996.   % canvas .c
  4997.   % pack .c
  4998.   % gnuplot .c
  4999.  
  5000.  The code generated by `gnuplot` creates a tcl procedure called "gnuplot"
  5001.  that takes the name of a canvas as its argument.  When the procedure is,
  5002.  called, it clears the canvas, finds the size of the canvas and draws the plot
  5003.  in it, scaled to fit.
  5004.  
  5005.  The current version of `tkcanvas` supports neither `multiplot` nor `replot`.
  5006. ?set terminal vx384
  5007. ?set term vx384
  5008. ?terminal vx384
  5009. ?term vx384
  5010. ?vx384
  5011.  The `vx384` terminal driver supports the Vectrix 384 and Tandy color
  5012.  printers.  It has no options.
  5013. ?set terminal epson-180dpi
  5014. ?set term epson-180dpi
  5015. ?terminal epson-180dpi
  5016. ?term epson-180dpi
  5017. ?epson-180dpi
  5018. ?set terminal epson-60dpi
  5019. ?set term epson-60dpi
  5020. ?terminal epson-60dpi
  5021. ?term epson-60dpi
  5022. ?epson-60dpi
  5023. ?set terminal epson-lx800
  5024. ?set term epson-lx800
  5025. ?terminal epson-lx800
  5026. ?term epson-lx800
  5027. ?epson-lx800
  5028. ?set terminal nec-cp6
  5029. ?set term nec-cp6
  5030. ?terminal nec-cp6
  5031. ?term nec-cp6
  5032. ?nec-cp6
  5033. ?set terminal okidata
  5034. ?set term okidata
  5035. ?terminal okidata
  5036. ?term okidata
  5037. ?okidata
  5038. ?set terminal starc
  5039. ?set term starc
  5040. ?terminal starc
  5041. ?term starc
  5042. ?starc
  5043. ?set terminal tandy-60dpi
  5044. ?set term tandy-60dpi
  5045. ?terminal tandy-60dpi
  5046. ?term tandy-60dpi
  5047. ?tandy-60dpi
  5048.  This driver supports a family of Epson printers and derivatives.
  5049.  
  5050.  `epson-180dpi` and `epson-60dpi` are drivers for Epson LQ-style 24-pin
  5051.  printers with resolutions of 180 and 60 dots per inch, respectively.
  5052.  
  5053.  `epson-lx800` is a generic 9-pin driver appropriate for printers like the
  5054.  Epson LX-800, the Star NL-10 and NX-1000, the PROPRINTER, and so forth.
  5055.  
  5056.  `nec-cp6` is generix 24-pin driver that can be used for printers like the
  5057.  NEC CP6 and the Epson LQ-800.
  5058.  
  5059.  The `okidata` driver supports the 9-pin OKIDATA 320/321 Standard printers.
  5060.  
  5061.  The `starc` driver is for the Star Color Printer.
  5062.  
  5063.  The `tandy-60dpi` driver is for the Tandy DMP-130 series of 9-pin, 60-dpi
  5064.  printers.
  5065.  
  5066.  Only `nec-cp6` has any options.
  5067.  Syntax:
  5068.        set terminal nec-cp6 {monochrome | colour | draft}
  5069.  
  5070.  which defaults to monochrome.
  5071.  With each of these drivers, a binary copy is required on a PC to print.  Do
  5072.  not use `print`---use instead `copy file /b lpt1:`.
  5073. ?set terminal emtex
  5074. ?set term emtex
  5075. ?terminal emtex
  5076. ?term emtex
  5077. ?latex
  5078. ?set terminal latex
  5079. ?set term latex
  5080. ?terminal latex
  5081. ?term latex
  5082. ?emtex
  5083.  The `latex` and `emtex` drivers allow two options.
  5084.  
  5085.  Syntax:
  5086.        set terminal latex | emtex {courier | roman} {<fontsize>}
  5087.  
  5088.  `fontsize` may be any size you specify.  The default is 10-point Roman.
  5089.  
  5090.  Unless your driver is capable of building fonts at any size (e.g. dvips),
  5091.  stick to the standard 10, 11 and 12 point sizes.
  5092.  
  5093.  METAFONT users beware: METAFONT does not like odd sizes.
  5094. ?set terminal pslatex
  5095. ?set term pslatex
  5096. ?terminal pslatex
  5097. ?term pslatex
  5098. ?pslatex
  5099. ?set terminal pstex
  5100. ?set term pstex
  5101. ?terminal pstex
  5102. ?term pstex
  5103. ?pstex
  5104.  The `pslatex` and `pstex` drivers generate output for further processing by
  5105.  LaTeX and TeX, respectively.  Figures generated by `pstex` can be included
  5106.  in any plain-based format (including LaTeX).
  5107.  
  5108.  Syntax:
  5109.        set terminal pslatex | |pstex {<color>} {<dashed>} {<rotate>}
  5110.                                      {auxfile} {<font_size>}
  5111.  
  5112.  <color> is either `color` or `monochrome`.  <rotate> is either `rotate` or
  5113.  `norotate` and determines if the y-axis label is rotated.  <font_size> is
  5114.  used to scale the font from its usual size.
  5115.  
  5116.  If `auxfile` is specified, it directs the driver to put the PostScript
  5117.  commands into an auxiliary file instead of directly into the LaTeX file.
  5118.  This is useful if your pictures are large enough that dvips cannot handle
  5119.  them.  The name of the auxiliary PostScript file is derived from the name of
  5120.  the TeX file given on the `set output` command; it is determined by replacing
  5121.  the trailing `.tex` (actually just the final extent in the file name---and
  5122.  the option will be turned off if there is no extent) with `.ps` in the output
  5123.  file name.  Remember to close the file before leaving `gnuplot`.
  5124.  
  5125.  Examples:
  5126.        set term pslatex monochrome dashed rotate       # set to defaults
  5127.  To write the PostScript commands into the file "foo.ps":
  5128.        set term pslatex auxfile
  5129.        set output "foo.tex"; plot ...: set output
  5130. ?set terminal eepic
  5131. ?set term eepic
  5132. ?terminal eepic
  5133. ?term eepic
  5134. ?eepic
  5135.  The `eepic` terminal driver supports the extended LaTeX picture environment.
  5136.  It is an alternative to the `latex` driver.
  5137.  
  5138.  The output of this terminal is intended for use with the "eepic.sty" macro
  5139.  package for LaTeX.  To use it, you need "eepic.sty", "epic.sty" and a
  5140.  printer driver that supports the "tpic" \specials.  If your printer driver
  5141.  doesn't support those \specials, "eepicemu.sty" will enable you to use some
  5142.  of them.
  5143.  
  5144.  Although dotted and dashed lines are possible with `eepic` and are tempting,
  5145.  they do not work well for high-sample-rate curves, fusing the dashes all
  5146.  together into a solid line.  For now, the `eepic` driver creates only solid
  5147.  lines.  There is another gnuplot driver (`tpic`) that supports dashed lines,
  5148.  but it cannot be used if your DVI driver doesn't support "tpic" \specials.
  5149.  
  5150.  The `eepic` terminal has no options.
  5151. ?set terminal tpic
  5152. ?set term tpic
  5153. ?terminal tpic
  5154. ?term tpic
  5155. ?tpic
  5156.  The `tpic` terminal driver supports the LaTeX picture environment with tpic
  5157.  \specials.  It is an alternative to the `latex` and `eepic` terminal drivers.
  5158.  Options are the point size, line width, and dot-dash interval.
  5159.  
  5160.  Syntax:
  5161.        set terminal tpic <pointsize> <linewidth> <interval>
  5162.  
  5163.  where `pointsize` and `linewidth` are integers in milli-inches and `interval`
  5164.  is a float in inches.  If a non-positive value is specified, the default is
  5165.  chosen: pointsize = 40, linewidth = 6, interval = 0.1.
  5166. ?set terminal pstricks
  5167. ?set term pstricks
  5168. ?terminal pstricks
  5169. ?term pstricks
  5170. ?pstricks
  5171.  The `pstricks` driver is intended for use with the "pstricks.sty" macro
  5172.  package for LaTeX.  It is an alternative to the `eepic` and `latex` drivers.
  5173.  You need "pstricks.sty", and, of course, a printer that understands
  5174.  PostScript.  Ghostscript understands PostScript, too.
  5175.  
  5176.  PSTricks is available via anonymous ftp from the /pub directory at
  5177.  Princeton.EDU.  This driver definitely does not come close to using the full
  5178.  capability of the PSTricks package.
  5179.  
  5180.  Syntax:
  5181.        set terminal pstricks {hacktext | nohacktext} {unit | nounit}
  5182.  
  5183.  The first option invokes an ugly hack that gives nicer numbers; the second
  5184.  has to do with plot scaling.  The defaults are `hacktext` and `nounit`.
  5185. ?set terminal texdraw
  5186. ?set term texdraw
  5187. ?terminal texdraw
  5188. ?term texdraw
  5189. ?texdraw
  5190.  The `texdraw` terminal driver supports the LaTeX texdraw environment.  It is
  5191.  intended for use with "texdraw.sty" and "texdraw.tex" in the texdraw package.
  5192.   It has no options.
  5193. ?set terminal mf
  5194. ?set term mf
  5195. ?terminal mf
  5196. ?term mf
  5197. ?mf
  5198. ?metafont
  5199.  The `mf` terminal driver creates a input file to the METAFONT program.  Thus a
  5200.  figure may be used in the TeX document in the same way as is a character.
  5201.  
  5202.  To use a picture in a document, the METAFONT program must be run with the
  5203.  output file from `gnuplot` as input.  Thus, the user needs a basic knowledge
  5204.  of the font creating process and the procedure for including a new font in a
  5205.  document.  However, if the METAFONT program is set up properly at the local
  5206.  site, an unexperienced user could perform the operation without much trouble.
  5207.  
  5208.  The text support is based on a METAFONT character set.  Currently the
  5209.  Computer Modern Roman font set is input, but the user is in principal free to
  5210.  chose whatever fonts he or she needs.  The METAFONT source files for the
  5211.  chosen font must be available.  Each character is stored in a separate
  5212.  picture variable in METAFONT.  These variables may be manipulated (rotated,
  5213.  scaled etc.) when characters are needed.  The drawback is the interpretation
  5214.  time in the METAFONT program.  On some machines (i.e. PC) the limited amount
  5215.  of memory available may also cause problems if too many pictures are stored.
  5216.  
  5217.  The `mf` terminal has no options.
  5218. ?set terminal mf detailed
  5219. ?set term mf detailed
  5220. ?mf detailed
  5221. ?metafont detailed
  5222.  
  5223.  - Set your terminal to METAFONT:
  5224.    set terminal mf
  5225.  - Select an output-file, e.g.:
  5226.    set output "myfigures.mf"
  5227.  - Create your pictures. Each picture will generate a separate character. Its
  5228.  default size will be 5*3 inches. You can change the size by saying `set size
  5229.  0.5,0.5` or whatever fraction of the default size you want to have.
  5230.  
  5231.  - Quit `gnuplot`.
  5232.  
  5233.  - Generate a TFM and GF file by running METAFONT on the output of `gnuplot`.
  5234.  Since the picture is quite large (5*3 in), you will have to use a version of
  5235.  METAFONT that has a value of at least 150000 for memmax.  On Unix systems
  5236.  these are conventionally installed under the name bigmf.  For the following
  5237.  assume that the command virmf stands for a big version of METAFONT.  For
  5238.  example:
  5239.  
  5240.  - Invoke METAFONT:
  5241.      virmf '&plain'
  5242.  - Select the output device: At the METAFONT prompt ('*') type:
  5243.      \mode:=CanonCX;     % or whatever printer you use
  5244.  - Optionally select a magnification:
  5245.      mag:=1;             % or whatever you wish
  5246.  - Input the `gnuplot`-file:
  5247.      input myfigures.mf
  5248.  On a typical Unix machine there will usually be a script called "mf" that
  5249.  executes virmf '&plain', so you probably can substitute mf for virmf &plain.
  5250.  This will generate two files: mfput.tfm and mfput.$$$gf (where $$$ indicates
  5251.  the resolution of your device).  The above can be conveniently achieved by
  5252.  typing everything on the command line, e.g.:
  5253.  virmf '&plain' '\mode:=CanonCX; mag:=1; input myfigures.mf'
  5254.  In this case the output files will be named myfigures.tfm and
  5255.  myfigures.300gf.
  5256.  
  5257.  - Generate a PK file from the GF file using gftopk:
  5258.    gftopk myfigures.300gf myfigures.300pk
  5259.  The name of the output file for gftopk depends on the DVI driver you use.
  5260.  Ask your local TeX administrator about the naming conventions.  Next, either
  5261.  install the TFM and PK files in the appropriate directories, or set your
  5262.  environment variables properly.  Usually this involves setting TEXFONTS to
  5263.  include the current directory and doing the same thing for the environment
  5264.  variable that your DVI driver uses (no standard name here...).  This step is
  5265.  necessary so that TeX will find the font metric file and your DVI driver will
  5266.  find the PK file.
  5267.  
  5268.  - To include your pictures in your document you have to tell TeX the font:
  5269.    \font\gnufigs=myfigures
  5270.  Each picture you made is stored in a single character.  The first picture is
  5271.  character 0, the second is character 1, and so on...  After doing the above
  5272.  step, you can use the pictures just like any other characters.  Therefore, to
  5273.  place pictures 1 and 2 centered in your document, all you have to do is:
  5274.    \centerline{\gnufigs\char0}
  5275.    \centerline{\gnufigs\char1}
  5276.  in plain TeX.  For LaTeX you can, of course, use the picture environment and
  5277.  place the picture wherever you wish by using the \makebox and \put macros.
  5278.  
  5279.  This conversion saves you a lot of time once you have generated the font;
  5280.  TeX handles the pictures as characters and uses minimal time to place them,
  5281.  and the documents you make change more often than the pictures do.  It also
  5282.  saves a lot of TeX memory.  One last advantage of using the METAFONT driver
  5283.  is that the DVI file really remains device independent, because no \special
  5284.  commands are used as in the eepic and tpic drivers.
  5285. ?set tics
  5286. ?show tics
  5287. ?tics
  5288.  The `set tics` command can be used to change the tics to be drawn outwards.
  5289.  
  5290.  Syntax:
  5291.        set tics {<direction>}
  5292.        show tics
  5293.  
  5294.  where <direction> may be `in` (the default) or `out`.
  5295.  
  5296.  See also `set xtics` for more control of major (labelled) tic marks and `set
  5297.  mxtics` for control of minor tic marks.
  5298. ?set ticslevel
  5299. ?show ticslevel
  5300. ?ticslevel
  5301.  Using `splot`, one can adjust the relative height of the vertical (Z) axis
  5302.  using `set ticslevel`.  The numeric argument provided specifies the location
  5303.  of the bottom of the scale (as a fraction of the z-range) above the xy-plane.
  5304.  The default value is 0.5.  Negative values are permitted, but tic labels on
  5305.  the three axes may overlap.
  5306.  
  5307.  To place the xy-plane at a position 'pos' on the z-axis, `ticslevel` should
  5308.  be set equal to  (pos - zmin) / (zmin - zmax).
  5309.  
  5310.  Syntax:
  5311.        set ticslevel {<level>}
  5312.        show tics
  5313.  
  5314.  See also `set view`.
  5315. ?set ticscale
  5316. ?show ticscale
  5317. ?ticscale
  5318.  The size of the tic marks can be adjusted with `set ticscale`.
  5319.  
  5320.  Syntax:
  5321.        set ticscale {<major> {<minor>}}
  5322.        show tics
  5323.  
  5324.  If <minor> is not specified, it is 0.5*<major>.  The default size is 1.0 for
  5325.  major tics and 0.5 for minor tics.  Note that it is possible to have the tic
  5326.  marks pointing outward by specifying a negative size.
  5327. ?set timestamp
  5328. ?set time
  5329. ?set notimestamp
  5330. ?show timestamp
  5331. ?timestamp
  5332. ?notimestamp
  5333.  The command `set timestamp` places the time and date of the plot in the left
  5334.  margin.
  5335.  
  5336.  Syntax:
  5337.        set timestamp {"<format>"} {top|bottom} {{no}rotate}
  5338.                      {<xoff>}{,<yoff>} {"<font>"}
  5339.        set notimestamp
  5340.        show timestamp
  5341.  
  5342.  The format string allows you to choose the format used to write the date and
  5343.  time.  Its default value is what asctime() uses: "%a %b %d %H:%M:%S %Y"
  5344.  (weekday, month name, day of the month, hours, minutes, seconds, four-digit
  5345.  year).  With `top` or `bottom` you can place the timestamp at the top or
  5346.  bottom of the left margin (default: bottom).  `rotate` lets you write the
  5347.  timestamp vertically, if your terminal supports vertical text.  The constants
  5348.  <xoff> and <off> are offsets from the default position given in character
  5349.  screen coordinates.  <font> is used to specify the font with which the time
  5350.  is to be written.
  5351.  
  5352.  The abbreviation `time` may be used in place of `timestamp`.
  5353.  
  5354.  Example:
  5355.        set timestamp "%d/%m/%y %H:%M" 80,-2 "Helvetica"
  5356.  
  5357.  See `set timefmt` for more information about time format strings.
  5358. ?set timefmt
  5359. ?show timefmt
  5360. ?timefmt
  5361.  This command applies to timeseries where data are composed of dates/times.
  5362.  It has no meaning unless the command `set xdata time` is given also.
  5363.  
  5364.  Syntax:
  5365.        set timefmt "<format string>"
  5366.        show timefmt
  5367.  
  5368.  The string argument tells `gnuplot` how to read timedata from the datafile.
  5369.  The valid formats are:
  5370.  
  5371.        Format       Explanation
  5372.        %d           day of the month, 1--31
  5373.        %m           month of the year, 1--12
  5374.        %y           year, 0--99
  5375.        %Y           year, 4-digit
  5376.        %j           day of the year, 1--365
  5377.        %H           hour, 0--24
  5378.        %M           minute, 0--60
  5379.        %S           second, 0--60
  5380.        %b           three-character abbreviation of the name of the month
  5381.        %B           name of the month
  5382.  Any character is allowed in the string, but must match exactly.  \t (tab) is
  5383.  recognized.  Backslash-octals (\nnn) are converted to char.  If there is no
  5384.  separating character between the date/time elements, then %d, %m, %y, %H, %M
  5385.  and %S read two digits each, %Y reads four digits and %j reads three digits.
  5386.  %b requires three characters, and %B requires as many as it needs.
  5387.  
  5388.  Spaces are treated slightly differently.  A space in the string stands for
  5389.  zero or more whitespace characters in the file.  That is, "%H %M" can be used
  5390.  to read "1220" and "12     20" as well as "12 20".
  5391.  
  5392.  Each set of non-blank characters in the timedata counts as one column in the
  5393.  `using n:n` specification.  Thus `11:11  25/12/76  21.0` consists of three
  5394.  columns.  To avoid confusion, `gnuplot` requires that you provide a complete
  5395.  `using` specification if your file contains timedata.
  5396.  
  5397.  Since `gnuplot` cannot read non-numerical text, if the date format includes
  5398.  the day or month in words, the format string must exclude this text.  But
  5399.  it can still be printed with the "%a", "%A", "%b", or "%B" specifier: see
  5400.  `set format` for more details about these and other options for printing
  5401.  timedata.  (`gnuplot` will determine the proper month and weekday from the
  5402.  numerical values.)
  5403.  
  5404.  See also `set xdata` and `Time/date` for more information.
  5405.  
  5406.  Example:
  5407.        set timefmt "%d/%m/%Y\t%H:%M"
  5408.  tells `gnuplot` to read date and time separated by tab.  (But look closely at
  5409.  your data---what began as a tab may have been converted to spaces somewhere
  5410.  along the line; the format string must match what is actually in the file.)
  5411. ?set title
  5412. ?show title
  5413. ?title
  5414.  The `set title` command produces a plot title that is centered at the top of
  5415.  the plot.  `set title` is a special case of `set label`.
  5416.  
  5417.  Syntax:
  5418.        set title {"<title-text>"} {<xoff>}{,<yoff>} {"<font>,{<size>}"}
  5419.        show title
  5420.  
  5421.  Specifying constants <xoff> or <yoff> as optional offsets for the title will
  5422.  move the title <xoff> or <yoff> character screen coordinates (not graph
  5423.  coordinates).  For example, "`set title ,-1`" will change only the y offset
  5424.  of the title, moving the title down by roughly the height of one character.
  5425.  
  5426.  <font> is used to specify the font with which the title is to be written;
  5427.  the units of the font <size> depend upon which terminal is used.
  5428.  
  5429.  `set title` with no parameters clears the title.
  5430.  
  5431.  See `syntax` for details about the processing of backslash sequences and
  5432.  the distinction between single- and double-quotes.
  5433. ?set tmargin
  5434. ?tmargin
  5435.  The command `set tmargin` sets the size of the top margin.  Please see
  5436.  `set margin` for details.
  5437. ?set trange
  5438. ?show trange
  5439. ?trange
  5440.  The `set trange` command sets the parametric range used to compute x and y
  5441.  values when in parametric or polar modes.  Please see `set xrange` for
  5442.  details.
  5443. ?set urange
  5444. ?show urange
  5445. ?urange
  5446.  The `set urange` and `set vrange` commands set the parametric ranges used
  5447.  to compute x, y, and z values when in `splot` parametric mode.  Please see
  5448.  `set xrange` for details.
  5449. ?show variables
  5450.  The `show variables` command lists all user-defined variables and their
  5451.  values.
  5452.  
  5453.  Syntax:
  5454.        show variables
  5455. ?set view
  5456. ?show view
  5457. ?view
  5458.  The `set view` command sets the viewing angle for `splot`s.  It controls how
  5459.  the 3-d coordinates of the plot are mapped into the 2-d screen space.  It
  5460.  provides controls for both rotation and scaling of the plotted data, but
  5461.  supports orthographic projections only.
  5462.  
  5463.  Syntax:
  5464.        set view <rot_x> {,{<rot_z>}{,{<scale>}{,<scale_z>}}}
  5465.        show view
  5466.  
  5467.  where <rot_x> and <rot_z> control the rotation angles (in degrees) in a
  5468.  virtual 3-d coordinate system aligned with the screen such that initially
  5469.  (that is, before the rotations are performed) the screen horizontal axis is
  5470.  x, screen vertical axis is y, and the axis perpendicular to the screen is z.
  5471.  The first rotation applied is <rot_x> around the x axis.  The second rotation
  5472.  applied is <rot_z> around the new z axis.
  5473.  
  5474.  <rot_x> is bounded to the [0:180] range with a default of 60 degrees, while
  5475.  <rot_z> is bounded to the [0:360] range with a default of 30 degrees.
  5476.  <scale> controls the scaling of the entire `splot`, while <scale_z> scales
  5477.  the z axis only.  Both scales default to 1.0.
  5478.  
  5479.  Examples:
  5480.        set view 60, 30, 1, 1
  5481.        set view ,,0.5
  5482.  
  5483.  The first sets all the four default values.  The second changes only scale,
  5484.  to 0.5.
  5485.  
  5486.  See also `set ticslevel`.
  5487. ?set vrange
  5488. ?show vrange
  5489. ?vrange
  5490.  The `set urange` and `set vrange` commands set the parametric ranges used
  5491.  to compute x, y, and z values when in `splot` parametric mode.  Please see
  5492.  `set xrange` for details.
  5493. ?set x2data
  5494. ?show x2data
  5495. ?x2data
  5496.  The `set x2data` command sets data on the x2 (top) axis to timeseries
  5497.  (dates/times).  Please see `set xdata`.
  5498. ?set x2dtics
  5499. ?set nox2dtics
  5500. ?show x2dtics
  5501. ?x2dtics
  5502. ?nox2dtics
  5503.  The `set x2dtics` command changes tics on the x2 (top) axis to days of the
  5504.  week.  Please see `set xmtics` for details.
  5505. ?set x2label
  5506. ?show x2label
  5507. ?x2label
  5508.  The `set x2label` command sets the label for the x2 (top) axis.  Please see
  5509.  `set xlabel`.
  5510. ?set x2mtics
  5511. ?set nox2mtics
  5512. ?show x2mtics
  5513. ?x2mtics
  5514. ?nox2mtics
  5515.  The `set x2mtics` command changes tics on the x2 (top) axis to months of the
  5516.  year.  Please see `set xmtics` for details.
  5517. ?set x2range
  5518. ?show x2range
  5519. ?x2range
  5520.  The `set x2range` command sets the horizontal range that will be displayed on
  5521.  the x2 (top) axis.  Please see `set xrange` for details.
  5522. ?set x2tics
  5523. ?set nox2tics
  5524. ?show x2tics
  5525. ?x2tics
  5526. ?nox2tics
  5527.  The `set x2tics` command controls major (labelled) tics on the x2 (top) axis.
  5528.  Please see `set xtics` for details.
  5529. ?set x2zeroaxis
  5530. ?set nox2zeroaxis
  5531. ?show x2zeroaxis
  5532. ?x2zeroaxis
  5533. ?nox2zeroaxis
  5534.  The `set x2zeroaxis` command draws a line at the origin of the x2 (top) axis
  5535.  (x2 = 0).  For details, please see
  5536.  `set zeroaxis`.
  5537. ?set xdata
  5538. ?show xdata
  5539. ?xdata
  5540.  This command sets the datatype on the x axis to date/time.  A similar command
  5541.  does the same thing for each of the other axes.
  5542.  
  5543.  Syntax:
  5544.        set xdata {time}
  5545.        show xdata
  5546.  
  5547.  The same syntax applies to `ydata`, `zdata`, `x2data` and `y2data`.
  5548.  
  5549.  The `time` option signals that the datatype is indeed date/time.  If the
  5550.  option is not specified, the datatype reverts to normal.
  5551.  
  5552.  See `set timefmt` to tell `gnuplot` how to read date or time data.  The
  5553.  date/time is converted to seconds from start of the century.  There is
  5554.  currently only one timefmt, which implies that all the date/time columns must
  5555.  confirm to this format.  Specification of ranges should be supplied as quoted
  5556.  strings according to this format to avoid interpretation of the date/time as
  5557.  an expression.
  5558.  
  5559.  The function 'strftime' (type "man strftime" on unix to look it up) is used
  5560.  to print ticmark labels.  `gnuplot` tries to figure out a reasonable format
  5561.  for this  unless the `set format x "string"` has supplied something that does
  5562.  not look like a decimal format (more than one '%' or neither %f nor %g).
  5563.  
  5564.  See also `Time/date` for more information.
  5565. ?set xdtics
  5566. ?set noxdtics
  5567. ?show xdtics
  5568. ?xdtics
  5569. ?noxdtics
  5570.  The `set xdtics` commands converts the x-axis tic marks to days of the week
  5571.  where 0=Sun and 6=Sat.  Overflows are converted modulo 7 to dates.  `set
  5572.  noxdtics` returns the labels to their default values.  Similar commands do
  5573.  the same things for the other axes.
  5574.  
  5575.  Syntax:
  5576.        set xdtics
  5577.        set noxdtics
  5578.        show xdtics
  5579.  
  5580.  The same syntax applies to `ydtics`, `zdtics`, `x2dtics` and `y2dtics`.
  5581.  
  5582.  See also the `set format` command.
  5583. ?set xlabel
  5584. ?show xlabel
  5585. ?xlabel
  5586.  The `set xlabel` command sets the x axis label.  Similar commands set labels
  5587.  on the other axes.
  5588.  
  5589.  Syntax:
  5590.        set xlabel {"<label>"} {<xoff>}{,<yoff>} {"<font>{,<size>}"}
  5591.        show xlabel
  5592.  
  5593.  The same syntax applies to `x2label`, `ylabel`, `y2label` and `zlabel`.
  5594.  
  5595.  Specifying the constants <xoff> or <yoff> as optional offsets for a label
  5596.  will move it <xoff> or <yoff> character widths or heights.  For example,
  5597.  "` set xlabel -1`" will change only the x offset of the xlabel, moving the
  5598.  label roughly one character width to the left.   The size of a character
  5599.  depends on both the font and the terminal.
  5600.  
  5601.  <font> is used to specify the font in which the label is written; the units
  5602.  of the font <size> depend upon which terminal is used.
  5603.  
  5604.  To clear a label, put no options on the command line, e.g., "`set y2label`".
  5605.  
  5606.  The default positions of the axis labels are as follows:
  5607.  
  5608.  xlabel:  The x-axis label is centered below the bottom axis.
  5609.  
  5610.  ylabel:  The position of the y-axis label depends on the terminal, and can be
  5611.  one of the following three positions:
  5612.  
  5613.  1. Horizontal text flushed left at the top left of the plot.  Terminals that
  5614.  cannot rotate text will probably use this method.  If `set x2tics` is also
  5615.  in use, the ylabel may overwrite the left-most x2tic label.  This may be
  5616.  remedied by adjusting the ylabel position or the left margin.
  5617.  
  5618.  2. Vertical text centered vertically at the left of the plot.  Terminals
  5619.  that can rotate text will probably use this method.
  5620.  
  5621.  3. Horizontal text centered vertically at the left of the plot.  The EEPIC,
  5622.  LaTeX and TPIC drivers use this method.  The user must insert line breaks
  5623.  using \\ to prevent the ylabel from overwriting the plot.  To produce a
  5624.  vertical row of characters, add \\ between every printing character (but this
  5625.  is ugly).
  5626.  
  5627.  zlabel: The z-axis label is centered along the z axis and placed in the space
  5628.  above the grid level.
  5629.  
  5630.  y2label: The y2-axis label is placed to the right of the y2 axis.  The
  5631.  position is terminal-dependent in the same manner as is the y-axis label.
  5632.  
  5633.  x2label: The x2-axis label is placed above the top axis but below the plot
  5634.  title.  It is also possible to create an x2-axis label by using new-line
  5635.  characters to make a multi-line plot title, e.g.,
  5636.  
  5637.        set title "This is the title\n\nThis is the x2label"
  5638.  
  5639.  Note that double quotes must be used.  The same font will be used for both
  5640.  lines, of course.
  5641.  
  5642.  If you are not satisfied with the default position of an axis label, use `set
  5643.  label` instead--that command gives you much more control over where text is
  5644.  placed.
  5645.  
  5646.  Please see `set syntax` for further information about backslash processing
  5647.  and the difference between single- and double-quoted strings.
  5648. ?set xmtics
  5649. ?set noxmtics
  5650. ?show xmtics
  5651. ?xmtics
  5652. ?noxmtics
  5653.  The `set xmtics` commands converts the x-axis tic marks to months of the
  5654.  year where 1=Jan and 12=Dec.  Overflows are converted modulo 12 to months.
  5655.  The tics are returned to their default labels by `set noxmtics`.  Similar
  5656.  commands perform the same duties for the other axes.
  5657.  
  5658.  Syntax:
  5659.        set xmtics
  5660.        set noxmtics
  5661.        show xmtics
  5662.  
  5663.  The same syntax applies to `x2mtics`, `ymtics`, `y2mtics`, and `zmtics`.
  5664.  
  5665.  See also the `set format` command.
  5666. ?set xrange
  5667. ?show xrange
  5668. ?xrange
  5669.  The `set xrange` command sets the horizontal range that will be displayed.
  5670.  A similar command exists for each of the other axes, as well as for the
  5671.  polar radius r and the parametric variables t, u, and v.
  5672.  
  5673.  Syntax:
  5674.        set xrange [{{<min>}:{<max>}}] {{no}reverse} {{no}writeback}
  5675.        show xrange
  5676.  
  5677.  where <min> and <max> terms are constants, expressions or an asterisk to set
  5678.  autoscaling.  If the data are date/time, you must give the range as a quoted
  5679.  string according to the `set timefmt` format.  Any value omitted will not be
  5680.  changed.
  5681.  
  5682.  The same syntax applies to `yrange`, `zrange`, `x2range`, `y2range`,
  5683.  `rrange`, `trange`, `urange` and `vrange`.
  5684.  
  5685.  The `reverse` option reverses the direction of the axis, e.g., `set xrange
  5686.  [0:1] reverse` will produce an axis with 1 on the left and 0 on the right.
  5687.  This is identical to the axis produced by `set xrange [1:0]`, of course.
  5688.  `reverse` is intended primarily for use with `autoscale`.
  5689.  
  5690.  The `writeback` option essentially saves the range found by `autoscale` in
  5691.  the buffers that would be filled by `set xrange`.  This is useful if you wish
  5692.  to plot several functions together but have the range determined by only
  5693.  some of them.  The `writeback` operation is performed during the `plot`
  5694.  execution, so it must be specified before that command.  For example,
  5695.  
  5696.        set xrange [-10:10]
  5697.        set yrange [] writeback
  5698.        plot sin(x)
  5699.        set noautoscale y
  5700.        replot x/2
  5701.  
  5702.  results in a yrange of [-1:1] as found only from the range of sin(x); the
  5703.  [-5:5] range of x/2 is ignored.  Executing `show yrange` after each command
  5704.  in the above example should help you understand what is going on.
  5705.  
  5706.  In 2-d, `xrange` and `yrange` determine the extent of the axes, `trange`
  5707.  determines the range of the parametric variable in parametric mode or the
  5708.  range of the angle in polar mode.  Similarly in parametric 3-d, `xrange`,
  5709.  `yrange`, and `zrange` govern the axes and `urange` and `vrange` govern the
  5710.  parametric variables.
  5711.  
  5712.  In polar mode, `rrange` determines the radial range plotted.  <rmin> acts as
  5713.  an additive constant to the radius, whereas <rmax> acts as a clip to the
  5714.  radius---no point with radius greater than <rmax> will be plotted.  `xrange`
  5715.  and `yrange` are affected---the ranges can be set as if the graph was of
  5716.  r(t)-rmin, with rmin added to all the labels.
  5717.  
  5718.  Any range may be partially or totally autoscaled, although it may not make
  5719.  sense to autoscale a parametric variable unless it is plotted with data.
  5720.  
  5721.  Ranges may also be specified on the `plot` command line.  A range given on
  5722.  the plot line will be used for that single `plot` command; a range given by
  5723.  a `set` command will be used for all subsequent plots that do not specify
  5724.  their own ranges.  The same holds true for `splot`.
  5725.  
  5726.  Examples:
  5727.  
  5728.  To set the xrange to the default:
  5729.        set xrange [-10:10]
  5730.  
  5731.  To set the yrange to increase downwards:
  5732.        set yrange [10:-10]
  5733.  
  5734.  To change zmax to 10 without affecting zmin (which may still be autoscaled):
  5735.        set zrange [:10]
  5736.  
  5737.  To autoscale xmin while leaving xmax unchanged:
  5738.        set xrange [*:]
  5739. ?set xtics
  5740. ?set noxtics
  5741. ?show xtics
  5742. ?xtics
  5743. ?noxtics
  5744.  Fine control of the major (labelled) tics on the x axis is possible with the
  5745.  `set xtics` command.  The tics may be turned off with the `set noxtics`
  5746.  command, and may be turned on (the default state) with `set xtics`.  Similar
  5747.  commands control the major tics on the y, z, x2 and y2 axes.
  5748.  
  5749.  Syntax:
  5750.        set xtics {axis | border} {{no}mirror} {{no}rotate}
  5751.                  {  <incr>
  5752.                   | <start>, <incr> {,<end>}
  5753.                   | ({"<label>"} <pos> {,{"<label>"} <pos>}...) }
  5754.        set noxtics
  5755.        show xtics
  5756.  
  5757.  The same syntax applies to `ytics`, `ztics`, `x2tics` and `y2tics`.
  5758.  
  5759.  `axis` or `border` tells `gnuplot` to put the tics (both the tics themselves
  5760.  and the accompanying labels) along the axis or the border, respectively.
  5761.  `mirror` tells it to put unlabelled tics at the same positions on the
  5762.  opposite border.  `nomirror` does what you think it does.  `rotate` asks
  5763.  `gnuplot` to rotate the text through 90 degrees, if the underlying terminal
  5764.  driver supports text rotation.  `norotate` cancels this.  The defaults are
  5765.  `border mirror norotate` for tics on the x, y, x2, and y2 axes.  For the
  5766.  z axis, the the `{axis | border}` option is not available and the default
  5767.  is `nomirror`.  If you do want to mirror the z-axis tics, you might want
  5768.  to create a bit more room for them with `set border`.
  5769.  
  5770.  The positions of the tics may be specified in either of two forms:
  5771.  
  5772.  The <start>, <incr>, <end> form specifies that a series of tics will be
  5773.  plotted on the axis between the values <start> and <end> with an increment of
  5774.  <incr>.  If <end> is not given, it is assumed to be infinity.  The increment
  5775.  may be negative.  If neither <start> nor <end> is given, <start> is assumed
  5776.  to be negative infinity, <end> is assumed to be positive infinity, and the
  5777.  tics will be drawn at multiples of <step>---there will be a tic at zero (if
  5778.  it is within the plotted range).  If the axis is logarithmic, the increment
  5779.  will be used as a multiplicative factor.
  5780.  
  5781.  Examples:
  5782.  
  5783.  Make tics at 0, 0.5, 1, 1.5, ..., 9.5, 10.
  5784.        set xtics 0,.5,10
  5785.  
  5786.  Make tics at ..., -10, -5, 0, 5, 10, ...
  5787.        set xtics 5
  5788.  
  5789.  Make tics at 1, 100, 1e4, 1e6, 1e8.
  5790.        set logscale x; set xtics 1,100,10e8
  5791.  
  5792.  The ("<label>" <pos>, ...) form allows arbitrary tic positions or non-numeric
  5793.  tic labels.  A set of tics is a set of positions, each with its own optional
  5794.  label.  Note that the label is a string enclosed by quotes, and may be a
  5795.  constant string, such as "hello", or contain formatting information for the
  5796.  tic number (which is the same as the position), such as "%3f clients".  See
  5797.  `set format` for more information about this case.  The label may be made
  5798.  empty by specifying it as an empty string.  If no string is given, the
  5799.  default label (numerical) is used.  In this form, the tics do not need to be
  5800.  listed in numerical order.
  5801.  
  5802.  Examples:
  5803.        set xtics ("low" 0, "medium" 50, "high" 100)
  5804.        set xtics (1,2,4,8,16,32,64,128,256,512,1024)
  5805.        set ytics ("bottom" 0, "" 10, "top" 20)
  5806.  
  5807.  In the second example, all tics are labelled.  In the third, only the end
  5808.  tics are labelled.
  5809.  
  5810.  Tics will only be plotted when in range.
  5811.  
  5812.  Minor (unlabelled) tics can be added by the `set mxtics` command.
  5813.  
  5814.  In case of timeseries data, position values must be given as quoted dates
  5815.  or times according to the format `timefmt`.  If the <start>, <incr>, <end>
  5816.  form is used, <start> and <end> must be given according to `timefmt`, but
  5817.  <incr> must be in seconds.  Times will be written out according to the format
  5818.  given on "set format", however.
  5819.  
  5820.  Examples:
  5821.        set xdata time
  5822.        set timefmt "%d/%m"
  5823.        set format x "%b %d"
  5824.        set xrange ["00/12":"06/12"]
  5825.        set xtics "01/12", 172800, "05/12"
  5826.  
  5827.        set xdata time
  5828.        set timefmt "%d/%m"
  5829.        set format x "%b %d"
  5830.        set xrange ["00/12":"06/12"]
  5831.        set xtics ("01/12", "" "03/12", "05/12")
  5832.  Both of these will produce tics "Dec 1", "Dec 3", and "Dec 5", but in the
  5833.  second example the tic at "Dec 3" will be unlabelled.
  5834.  
  5835. ?set xzeroaxis
  5836. ?set noxzeroaxis
  5837. ?show xzeroaxis
  5838. ?xzeroaxis
  5839. ?noxzeroaxis
  5840.  The `set xzeroaxis` command draws a line at x = 0.  For details, please see
  5841.  `set zeroaxis`.
  5842. ?set y2data
  5843. ?show y2data
  5844. ?y2data
  5845.  The `set y2data` command sets y2 (right-hand) axis data to timeseries
  5846.  (dates/times).  Please see `set xdata`.
  5847. ?set y2dtics
  5848. ?set noy2dtics
  5849. ?show y2dtics
  5850. ?y2dtics
  5851. ?noy2dtics
  5852.  The `set y2dtics` command changes tics on the y2 (right-hand) axis to days of
  5853.  the week.  Please see `set xmtics` for details.
  5854. ?set y2label
  5855. ?show y2label
  5856. ?y2label
  5857.  The `set y2dtics` command sets the label for the y2 (right-hand) axis.
  5858.  Please see `set xlabel`.
  5859. ?set y2mtics
  5860. ?set noy2mtics
  5861. ?show y2mtics
  5862. ?y2mtics
  5863. ?noy2mtics
  5864.  The `set y2mtics` command changes tics on the y2 (right-hand) axis to months
  5865.  of the year.  Please see `set xmtics` for details.
  5866. ?set y2range
  5867. ?show y2range
  5868. ?y2range
  5869.  The `set y2range` command sets the vertical range that will be displayed on
  5870.  the y2 (right-hand) axis.  Please see `set xrange` for details.
  5871. ?set y2tics
  5872. ?set noy2tics
  5873. ?show y2tics
  5874. ?y2tics
  5875. ?noy2tics
  5876.  The `set y2tics` command controls major (labelled) tics on the y2 (right-hand)
  5877.  axis.  Please see `set xtics` for details.
  5878. ?set y2zeroaxis
  5879. ?set noy2zeroaxis
  5880. ?show y2zeroaxis
  5881. ?y2zeroaxis
  5882. ?noy2zeroaxis
  5883.  The `set y2zeroaxis` command draws a line at the origin of the y2 (right-hand)
  5884.  axis (y2 = 0).  For details, please see `set zeroaxis`.
  5885. ?set ydata
  5886. ?show ydata
  5887. ?ydata
  5888.  Sets y-axis data to timeseries (dates/times).  Please see `set xdata`.
  5889. ?set ydtics
  5890. ?set noydtics
  5891. ?show ydtics
  5892. ?ydtics
  5893. ?noydtics
  5894.  The `set ydtics` command changes tics on the y axis to days of the week.
  5895.  Please see `set xmtics` for details.
  5896. ?set ylabel
  5897. ?show ylabel
  5898. ?ylabel
  5899.  This command sets the label for the y axis.  Please see `set xlabel`.
  5900. ?set ymtics
  5901. ?set noymtics
  5902. ?show ymtics
  5903. ?ymtics
  5904. ?noymtics
  5905.  The `set ymtics` command changes tics on the y axis to months of the year.
  5906.  Please see `set xmtics` for details.
  5907. ?set yrange
  5908. ?show yrange
  5909. ?yrange
  5910.  The `set yrange` command sets the vertical range that will be displayed on
  5911.  the y axis.  Please see `set xrange` for details.
  5912. ?set ytics
  5913. ?set noytics
  5914. ?show ytics
  5915. ?ytics
  5916. ?noytics
  5917.  The `set ytics` command controls major (labelled) tics on the y axis.
  5918.  Please see `set xtics` for details.
  5919. ?set yzeroaxis
  5920. ?set noyzeroaxis
  5921. ?show yzeroaxis
  5922. ?yzeroaxis
  5923. ?noyzeroaxis
  5924.  The `set yzeroaxis` command draws a line at y = 0.  For details, please see
  5925.  `set zeroaxis`.
  5926. ?set zdata
  5927. ?show zdata
  5928. ?zdata
  5929.  Set zaxis date to timeseries (dates/times).  Please see `set xdata`.
  5930. ?set zdtics
  5931. ?set nozdtics
  5932. ?show zdtics
  5933. ?zdtics
  5934. ?nozdtics
  5935.  The `set zdtics` command changes tics on the z axis to days of the week.
  5936.  Please see `set xmtics` for details.
  5937. ?set zero
  5938. ?show zero
  5939. ?zero
  5940.  The `zero` value is the default threshold for values approaching 0.0.
  5941.  
  5942.  Syntax:
  5943.        set zero <expression>
  5944.        show zero
  5945.  
  5946.  `gnuplot` will not plot a point if its imaginary part is greater in magnitude
  5947.  than the `zero` threshold.  Axis ranges cannot be less than `zero`.  The
  5948.  default `zero` value is 1e-8.
  5949. ?set zeroaxis
  5950. ?set nozeroaxis
  5951. ?show zeroaxis
  5952. ?zeroaxis
  5953. ?nozeroaxis
  5954.  The x axis may be drawn by `set xzeroaxis` and removed by `set noxzeroaxis`.
  5955.  Similar commands behave similarly for the y, x2, and y2 axes.
  5956.  
  5957.  Syntax:
  5958.        set zeroaxis {<linetype>}
  5959.        set xzeroaxis {<linetype>}
  5960.        set yzeroaxis {<linetype>}
  5961.        set x2zeroaxis {<linetype>}
  5962.        set y2zeroaxis {<linetype>}
  5963.        set nozeroaxis
  5964.        set noxzeroaxis
  5965.        etc.
  5966.        show zeroaxis
  5967.        show xzeroaxis
  5968.        etc.
  5969.  
  5970.  By default, these options are off.  The selected zero axis is drawn with a
  5971.  line of type <linetype> from the default linetype list provided by the
  5972.  terminal; user-defined linetypes (via the `set linestyle` command) are not
  5973.  accessible for these axes.  If <linetype> is not specified, any zero axes
  5974.  selected will be drawn using the axis linetype (linetype 0).
  5975.  
  5976.  `set zeroaxis l` is equivalent to `set xzeroaxis l; set yzeroaxis l`. `set
  5977.  nozeroaxis` is equivalent to `set noxzeroaxis; set noyzeroaxis`.
  5978. ?set zlabel
  5979. ?show zlabel
  5980. ?zlabel
  5981.  This command sets the label for the z axis.  Please see `set xlabel`.
  5982. ?set zmtics
  5983. ?set nozmtics
  5984. ?show zmtics
  5985. ?zmtics
  5986. ?nozmtics
  5987.  The `set zmtics` command changes tics on the z axis to months of the year.
  5988.  Please see `set xmtics` for details.
  5989. ?set zrange
  5990. ?show zrange
  5991. ?zrange
  5992.  The `set zrange` command sets the range that will be displayed on the z axis.
  5993.  The zrange is used only by `splot` and is ignored by `plot`.  Please see `set
  5994.  xrange` for details.
  5995. ?set ztics
  5996. ?set noztics
  5997. ?show ztics
  5998. ?ztics
  5999. ?noztics
  6000.  The `set ztics` command controls major (labelled) tics on the z axis.
  6001.  Please see `set xtics` for details.
  6002. ?shell
  6003.  The `shell` command spawns an interactive shell.  To return to `gnuplot`,
  6004.  type `logout` if using VMS, `exit` or the END-OF-FILE character if using
  6005.  Unix, `endcli` if using AmigaDOS, or `exit` if using MS-DOS or OS/2.
  6006.  
  6007.  A single shell command may be spawned by preceding it with the ! character
  6008.  ($ if using VMS) at the beginning of a command line.  Control will return
  6009.  immediately to `gnuplot` after this command is executed.  For example, in
  6010.  Unix, AmigaDOS, MS-DOS or OS/2,
  6011.  
  6012.        ! dir
  6013.  
  6014.  prints a directory listing and then returns to `gnuplot`.
  6015.  
  6016.  On an Atari, the `!` command first checks whether a shell is already loaded
  6017.  and uses it, if available.  This is practical if `gnuplot` is run from
  6018.  `gulam`, for example.
  6019. ?splot
  6020.  `splot` is the primary command for drawing 3-d plots (well, actually
  6021.  projections on a 2-d surface, but you knew that).  It can create a plot from
  6022.  functions or data in a manner very similar to the `plot` command.
  6023.  
  6024.  Please see `plot` for features common to the `plot` command; only differences
  6025.  are discussed in detail here.
  6026.  
  6027.  Syntax:
  6028.        splot {<ranges>}
  6029.              {<function> | {"<datafile>" {datafile-modifiers}}}
  6030.              {<title-spec>} {with <style>}
  6031.              {, {definitions,} <function> ...}
  6032.  
  6033.  where either a <function> or the name of a data file enclosed in quotes is
  6034.  supplied.  A function is a mathematical expression, or a triple (`splot`) of
  6035.  mathematical expressions in parametric mode.
  6036.  
  6037.  By default `splot` draws the xy plane completely below the plotted data.  The
  6038.  offset between the lowest ztic and the xy plane can be changed by `set
  6039.  ticslevel`.  The orientation of a 'splot' is controlled by `set view`.  See
  6040.  `set view` and `set ticslevel` for more information.
  6041.  
  6042.  The syntax for setting ranges on the `splot` command is the same as for
  6043.  `plot`.  In non-parametric mode, the order in which ranges must be given is
  6044.  `xrange`, `yrange`, and `zrange`.  In parametric mode, the order is `urange`,
  6045.  `vrange`, `xrange`, `yrange`, and `zrange`.
  6046.  
  6047.  The `title` option is the same as in `plot`.  The operation of `with` is also
  6048.  the same as in `plot`, except that the plotting styles available to `splot`
  6049.  are limited to `lines`, `points`, `linespoints`, `dots`, and `impulses`;  the
  6050.  error-bar capabilities of `plot` are not available for `splot`.
  6051.  
  6052.  The datafile options have more differences.
  6053. ?splot data-file
  6054. ?splot datafile
  6055.  Discrete data contained in a file can be displayed by specifying the name of
  6056.  the data file (enclosed in quotes) on the `plot` or `splot` command line.
  6057.  
  6058.  Syntax:
  6059.        splot '<file_name>' {binary | matrix}
  6060.                            {index <index list>}
  6061.                            {every <every list>}
  6062.                            {using <using list>}
  6063.  
  6064.  The special filenames `""` and `"-"` are permitted, as in `plot`.
  6065.  
  6066.  In brief, `binary` indicates that the file is binary, `matrix` indicates that
  6067.  the data are in matrix form, `index` selects which data sets in a
  6068.  multi-data-set file are to be plotted, `every` specifies which datalines
  6069.  within a single data set are to be plotted, and `using` determines how the
  6070.  columns within a single record are to be interpreted.
  6071.  
  6072.  The options `index` and `every` behave the same way as with `plot`.  `using`
  6073.  also does, with the obvious difference that the `using` list must provide
  6074.  three entries instead of two.
  6075.  
  6076.  The `plot` options `thru` and `smooth` are not available for `splot`.
  6077.  
  6078.  Data file organization is essentially the same as for `plot`, except that
  6079.  each point is an (x,y,z) triple.  If only a single value is provided, it will
  6080.  be used for z, the data point number will be used for x, and the y-isoline
  6081.  number will be used for y; thus "`splot 'file' using 1`" is identical to
  6082.  "`splot 'file' using 0:-1:1`".  If two values are provided, `gnuplot` gives
  6083.  you an error message.  Three values are interpreted as an (x,y,z) triple.
  6084.  Additional values are generally used as errors, which can be used by `fit`.
  6085.  
  6086.  Single blank records separate datalines (which are interpreted as y-isolines)
  6087.  in a `splot` datafile.  No line will join points separated by a blank record.
  6088.  If all datalines contain the same number of points,`gnuplot` will draw
  6089.  cross-isolines in the opposite direction.  This is termed "grid data", and is
  6090.  required for drawing a surface, for contouring (`set contour`) and
  6091.  hidden-line removal (`set hidden3d`).
  6092.  
  6093.  It is no longer necessary to specify `parametric` mode for three-column
  6094.  `splot`s.
  6095. ?splot data-file binary
  6096. ?splot datafile binary
  6097. ?splot binary
  6098. ?data-file binary
  6099. ?datafile binary
  6100. ?binary
  6101. ?binary data
  6102. ?binary files
  6103.  In previous versions, `gnuplot` dynamically detected binary data files.  It
  6104.  is now necessary to specify the keyword `binary` directly after the filename.
  6105.  
  6106.  Single precision floats are stored in a binary file as follows:
  6107.  
  6108.        <N+1>  <y0>   <y1>   <y2>  ...  <yN>
  6109.         <x0> <z0,0> <z0,1> <z0,2> ... <z0,N>
  6110.         <x1> <z1,0> <z1,1> <z1,2> ... <z1,N>
  6111.          :      :      :      :   ...    :
  6112.  
  6113.  
  6114.  which are converted into triplets:
  6115.  
  6116.        <x0> <y0> <z0,0>
  6117.        <x0> <y1> <z0,1>
  6118.        <x0> <y2> <z0,2>
  6119.         :    :     :
  6120.        <x0> <yN> <z0,N>
  6121.  
  6122.        <x1> <y0> <z1,0>
  6123.        <x1> <y1> <z1,1>
  6124.         :    :     :
  6125.  
  6126.  These triplets are then converted into `gnuplot` iso-curves and then
  6127.  `gnuplot` proceeds in the usual manner to do the rest of the plotting.
  6128.  
  6129.  A collection of matrix and vector manipulation routines (in C) is provided
  6130.  in `binary.c`.  The routine to write binary data is
  6131.  
  6132.        int fwrite_matrix(file,m,nrl,nrl,ncl,nch,row_title,column_title)
  6133.  
  6134.  An example of using these routines is provided in the file `bf_test.c`, which
  6135.  generates binary files for the demo file `demo/binary.dem`.
  6136.  
  6137.  The `index` keyword is not supported, since the file format allows only one
  6138.  surface per file.  The `every` and `using` filters are supported.  `using`
  6139.  operates as if the data were read in the above triplet form.
  6140. ?splot data-file example
  6141. ?splot datafile example
  6142. ?splot example
  6143.  A simple example of plotting a 3-d data file is
  6144.  
  6145.        splot 'datafile.dat'
  6146.  
  6147.  where the file "datafile.dat" might contain:
  6148.  
  6149.        # The valley of the Gnu.
  6150.           0 0 10
  6151.           0 1 10
  6152.           0 2 10
  6153.  
  6154.           1 0 10
  6155.           1 1 5
  6156.           1 2 10
  6157.  
  6158.           2 0 10
  6159.           2 1 1
  6160.           2 2 10
  6161.  
  6162.           3 0 10
  6163.           3 1 0
  6164.           3 2 10
  6165.  
  6166.  Note that "datafile.dat" defines a 4 by 3 grid ( 4 rows of 3 points each ).
  6167.  Rows are separated by blank records.
  6168.  
  6169.  Note also that the x value is held constant within each dataline.  If you
  6170.  instead keep y constant, and plot with hidden-line removal enabled, you will
  6171.  find that the surface is drawn 'inside-out'.
  6172.  
  6173.  Actually for grid data it is not necessary to keep the x values constant
  6174.  within an dataline, nor is it necessary to keep the y values the same along
  6175.  the perpendicular datalines.  `gnuplot` requires only that the number of
  6176.  points be the same for each dataline.
  6177. ?splot data-file matrix
  6178. ?splot datafile matrix
  6179. ?splot matrix
  6180. ?data-file matrix
  6181. ?datafile matrix
  6182. ?matrix
  6183.  The `matrix` flag indicates that the data are stored in matrix format.  In
  6184.  its present implementation the z-values are read in a row at a time, i. e.,
  6185.        z11 z12 z13 z14 ...
  6186.        z21 z22 z23 z24 ...
  6187.        z31 z32 z33 z34 ...
  6188.  and so forth.  The row and column indices are used for the x- and y-values.
  6189.  used as x, y, and z.
  6190. ?test
  6191.  `test` creates a display of line and point styles and other useful things
  6192.  appropriate for the terminal you are using.
  6193.  
  6194.  Syntax:
  6195.        test
  6196. ?update
  6197.  This command writes the current values of the fit parameters into the given
  6198.  file, which is formatted as an initial-value file (as described in the `fit`
  6199.  section).  This is useful for saving the current values for later use or for
  6200.  restarting a converged or stopped fit.
  6201.  
  6202.  Syntax:
  6203.        update <filename> {<filename>}
  6204.  
  6205.  If the file already exists, `gnuplot` first renames it by appending `.old`
  6206.  and then opens a new file.  That is, "`update 'fred'`" behaves the same way
  6207.  as "`!rename fred fred.old; update 'fred.old' 'fred'`".  [On DOS and other
  6208.  systems that use the twelve-character "filename.ext" naming convention, "ext"
  6209.  will be "`old`" and "filename" will be related (hopefully recognizably) to
  6210.  the initial name.  Renaming is not done at all on VMS systems, since they use
  6211.  file-versioning.]
  6212.  
  6213.  If a second filename is supplied, the updated values are written to this
  6214.  file instead, and the original parameter file is left unmodified.
  6215.  
  6216.  Please see `fit` for more information.
  6217. ?graphical user interfaces
  6218. ?gui's
  6219.  Several graphical user interfaces have been written for `gnuplot` and one for
  6220.  win32 is included in this distribution.  In addition, there is a Macintosh
  6221.  interface at
  6222.         ftp://ftp.ee.gatech.edu/pub/mac/gnuplot
  6223.  and several X11 interfaces include three Tcl/Tk located at the usual Tcl/Tk
  6224.  repositories.
  6225. ?bugs
  6226.  The bessel functions do not work for complex arguments.
  6227.  
  6228.  The gamma function does not work for complex arguments.
  6229.  
  6230.  There is a bug in the stdio library for old Sun operating systems (SunOS
  6231.  Sys4-3.2).  The "%g" format for 'printf' sometimes incorrectly prints numbers
  6232.  (e.g., 200000.0 as "2").  Thus, tic mark labels may be incorrect on a Sun4
  6233.  version of `gnuplot`.  A work-around is to rescale the data or use the `set
  6234.  format` command to change the tic mark format to "%7.0f" or some other
  6235.  appropriate format.  This appears to have been fixed in SunOS 4.0.
  6236.  
  6237.  Another bug: On a Sun3 under SunOS 4.0, and on Sun4's under Sys4-3.2 and
  6238.  SunOS 4.0, the 'sscanf' routine incorrectly parses "00 12" with the format
  6239.  "%f %f" and reads 0 and 0 instead of 0 and 12.  This affects data input.  If
  6240.  the data file contains x coordinates that are zero but are specified like
  6241.  '00', '000', etc, then you will read the wrong y values.  Check any data
  6242.  files or upgrade the SunOS.  It appears to have been fixed in SunOS 4.1.1.
  6243.  
  6244.  Suns appear to overflow when calculating exp(-x) for large x, so `gnuplot`
  6245.  gets an undefined result.  One work-around is to make a user-defined function
  6246.  like e(x) = x<-500 ? 0 : exp(x).  This affects plots of Gaussians (exp(-x*x))
  6247.  in particular, since x*x grows quite rapidly.
  6248.  
  6249.  Microsoft C 5.1 has a nasty bug associated with the %g format for 'printf'.
  6250.  When any of the formats "%.2g", "%.1g", "%.0g", "%.g" are used, 'printf' will
  6251.  incorrectly print numbers in the range 1e-4 to 1e-1.  Numbers that should be
  6252.  printed in the %e format are incorrectly printed in the %f format, with the
  6253.  wrong number of zeros after the decimal point.  To work around this problem,
  6254.  use the %e or %f formats explicitly.
  6255.  
  6256.  `gnuplot`, when compiled with Microsoft C, did not work correctly on two VGA
  6257.  displays that were tested.  The CGA, EGA and VGA drivers should probably be
  6258.  rewritten to use the Microsoft C graphics library.  `gnuplot` compiled with
  6259.  Borland C++ uses the Turbo C graphics drivers and does work correctly with
  6260.  VGA displays.
  6261.  
  6262.  VAX/VMS 4.7 C compiler release 2.4 also has a poorly implemented %g format
  6263.  for 'printf'.  The numbers are printed numerically correct, but may not be in
  6264.  the requested format.  The K&R second edition says that for the %g format, %e
  6265.  is used if the exponent is less than -4 or greater than or equal to the
  6266.  precision.  The VAX uses %e format if the exponent is less than -1.  The VAX
  6267.  appears to take no notice of the precision when deciding whether to use %e or
  6268.  %f for numbers less than 1.  To work around this problem, use the %e or %f
  6269.  formats explicitly.  From the VAX C 2.4 release notes: e,E,f,F,g,G  Result
  6270.  will always contain a decimal  point.  For g and G, trailing zeros will not
  6271.  be removed from the result.
  6272.  
  6273.  VAX/VMS 5.2 C compiler release 3.0 has a slightly better implemented %g
  6274.  format than release 2.4, but not much.  Trailing decimal points are now
  6275.  removed, but trailing zeros are still not removed from %g numbers in
  6276.  exponential format.
  6277.  
  6278.  The two preceding problems are actually in the libraries rather than in the
  6279.  compilers.  Thus the problems will occur whether `gnuplot` is built using
  6280.  either the DEC compiler or some other one (e.g. the latest gcc).
  6281.  
  6282.  ULTRIX X11R3 has a bug that causes the X11 driver to display "every other"
  6283.  graph.  The bug seems to be fixed in DEC's release of X11R4 so newer releases
  6284.  of ULTRIX don't seem to have the problem.  Solutions for older sites include
  6285.  upgrading the X11 libraries (from DEC or direct from MIT) or defining
  6286.  ULTRIX_KLUDGE when compiling the x11.trm file.  Note that the kludge is not
  6287.  an ideal fix, however.
  6288.  
  6289.  The constant HUGE was incorrectly defined in the NeXT OS 2.0 operating
  6290.  system.  HUGE should be set to 1e38 in plot.h. This error has been corrected
  6291.  in the 2.1 version of NeXT OS.
  6292.  
  6293.  Some older models of HP plotters do not have a page eject command 'PG'.  The
  6294.  current HPGL driver uses this command in HPGL_reset.  This may need to be
  6295.  removed for these plotters.  The current PCL5 driver uses HPGL/2 for text as
  6296.  well as graphics.  This should be modified to use scalable PCL fonts.
  6297.  
  6298.  On the Atari version, it is not possible to send output directly to the
  6299.  printer (using `/dev/lp` as output file), since CRs are added to LFs in
  6300.  binary output.  As a work-around, write the output to a file and copy it to
  6301.  the printer afterwards using a shell command.
  6302.  
  6303.  On AIX 4, the literal 'NaNq' in a datafile causes the special internal value
  6304.  'not-a-number' to be stored, rather than setting an internal 'undefined'
  6305.  flag.  A workaround is to use `set missing 'NaNq'`.
  6306.  
  6307.  There may be an up-to-date list of bugs since the release on the WWW page:
  6308.        http://www.cs.dartmouth.edu/gnuplot
  6309.  
  6310.  Please report any bugs to bug-gnuplot@dartmouth.edu.
  6311.